Struct h2::Reason [−][src]
pub struct Reason(_);
Expand description
HTTP/2 error codes.
Error codes are used in RST_STREAM
and GOAWAY
frames to convey the
reasons for the stream or connection error. For example,
SendStream::send_reset
takes a Reason
argument. Also, the Error
type
may contain a Reason
.
Error codes share a common code space. Some error codes apply only to streams, others apply only to connections, and others may apply to either. See [RFC 7540] for more information.
Implementations
The associated condition is not a result of an error.
For example, a GOAWAY might include this code to indicate graceful shutdown of a connection.
The endpoint detected an unspecific protocol error.
This error is for use when a more specific error code is not available.
The endpoint encountered an unexpected internal error.
The endpoint detected that its peer violated the flow-control protocol.
The endpoint sent a SETTINGS frame but did not receive a response in a timely manner.
The endpoint received a frame after a stream was half-closed.
The endpoint received a frame with an invalid size.
The endpoint refused the stream prior to performing any application processing.
The endpoint is unable to maintain the header compression context for the connection.
The connection established in response to a CONNECT request was reset or abnormally closed.
The endpoint detected that its peer is exhibiting a behavior that might be generating excessive load.
The underlying transport has properties that do not meet minimum security requirements.
The endpoint requires that HTTP/1.1 be used instead of HTTP/2.
Get a string description of the error code.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Reason
impl UnwindSafe for Reason
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key
and return true
if they are equal.
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more