Refactor errors internals (#556)
h2::Error now knows whether protocol errors happened because the user sent them, because it was received from the remote peer, or because the library itself emitted an error because it detected a protocol violation. It also keeps track of whether it came from a RST_STREAM or GO_AWAY frame, and in the case of the latter, it includes the additional debug data if any. Fixes #530
This commit is contained in:
@@ -104,8 +104,14 @@ macro_rules! ready {
|
||||
mod codec;
|
||||
mod error;
|
||||
mod hpack;
|
||||
|
||||
#[cfg(not(feature = "unstable"))]
|
||||
mod proto;
|
||||
|
||||
#[cfg(feature = "unstable")]
|
||||
#[allow(missing_docs)]
|
||||
pub mod proto;
|
||||
|
||||
#[cfg(not(feature = "unstable"))]
|
||||
mod frame;
|
||||
|
||||
@@ -125,7 +131,7 @@ pub use crate::error::{Error, Reason};
|
||||
pub use crate::share::{FlowControl, Ping, PingPong, Pong, RecvStream, SendStream, StreamId};
|
||||
|
||||
#[cfg(feature = "unstable")]
|
||||
pub use codec::{Codec, RecvError, SendError, UserError};
|
||||
pub use codec::{Codec, SendError, UserError};
|
||||
|
||||
use std::task::Poll;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user