[−][src]Struct h2::Reason
HTTP/2.0 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.
Methods
impl Reason
[src]
[−]
impl Reason
pub const NO_ERROR: Reason
[src][−]
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.
pub const PROTOCOL_ERROR: Reason
[src][−]
The endpoint detected an unspecific protocol error.
This error is for use when a more specific error code is not available.
pub const INTERNAL_ERROR: Reason
[src][−]
The endpoint encountered an unexpected internal error.
pub const FLOW_CONTROL_ERROR: Reason
[src][−]
The endpoint detected that its peer violated the flow-control protocol.
pub const SETTINGS_TIMEOUT: Reason
[src][−]
The endpoint sent a SETTINGS frame but did not receive a response in a timely manner.
pub const STREAM_CLOSED: Reason
[src][−]
The endpoint received a frame after a stream was half-closed.
pub const FRAME_SIZE_ERROR: Reason
[src][−]
The endpoint received a frame with an invalid size.
pub const REFUSED_STREAM: Reason
[src][−]
The endpoint refused the stream prior to performing any application processing.
pub const CANCEL: Reason
[src][−]
Used by the endpoint to indicate that the stream is no longer needed.
pub const COMPRESSION_ERROR: Reason
[src][−]
The endpoint is unable to maintain the header compression context for the connection.
pub const CONNECT_ERROR: Reason
[src][−]
The connection established in response to a CONNECT request was reset or abnormally closed.
pub const ENHANCE_YOUR_CALM: Reason
[src][−]
The endpoint detected that its peer is exhibiting a behavior that might be generating excessive load.
pub const INADEQUATE_SECURITY: Reason
[src][−]
The underlying transport has properties that do not meet minimum security requirements.
pub const HTTP_1_1_REQUIRED: Reason
[src][−]
The endpoint requires that HTTP/1.1 be used instead of HTTP/2.
pub fn description(&self) -> &str
[src]
[−]
pub fn description(&self) -> &str
Get a string description of the error code.
Trait Implementations
impl Clone for Reason
[src]
[+]
impl Clone for Reason
impl Copy for Reason
[src]
impl Copy for Reason
impl From<Reason> for Error
[src]
[+]
impl From<Reason> for Error
impl From<u32> for Reason
[src]
[+]
impl From<u32> for Reason
impl From<Reason> for u32
[src]
[+]
impl From<Reason> for u32
impl Eq for Reason
[src]
impl Eq for Reason
impl PartialEq<Reason> for Reason
[src]
[+]
impl PartialEq<Reason> for Reason
impl Display for Reason
[src]
[+]
impl Display for Reason
impl Debug for Reason
[src]
[+]
impl Debug for Reason
Auto Trait Implementations
Blanket Implementations
impl<T> From for T
[src]
[−]
impl<T> From for T
impl<T, U> Into for T where
U: From<T>,
[src]
[−]
impl<T, U> Into for T where
U: From<T>,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
[−]
impl<T> ToString for T where
T: Display + ?Sized,
impl<T> ToOwned for T where
T: Clone,
[src]
[−]
impl<T> ToOwned for T where
T: Clone,
type Owned = T
fn to_owned(&self) -> T
[src]
[−]
fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
fn clone_into(&self, target: &mut T)
[src]
[−]
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<T, U> TryFrom for T where
T: From<U>,
[src]
[−]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
[−]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
try_from
)Performs the conversion.
impl<T> Borrow for T where
T: ?Sized,
[src]
[−]
impl<T> Borrow for T where
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
[−]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
[−]
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
[−]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
[−]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
try_from
)Performs the conversion.
impl<T> Any for T where
T: 'static + ?Sized,
[src]
[−]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId
[src]
[−]
fn get_type_id(&self) -> TypeId
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
Gets the TypeId
of self
. Read more
impl<Q, K> Equivalent for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
[−]
impl<Q, K> Equivalent for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
fn equivalent(&self, key: &K) -> bool
[src]
[−]
fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.