[][src]Struct h2::Reason

pub struct 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.

See Error Codes in the spec.

Methods

impl 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.

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.

Used by the endpoint to indicate that the stream is no longer needed.

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

impl From<Reason> for Error
[src]

Performs the conversion.

impl PartialEq for Reason
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Eq for Reason
[src]

impl Clone for Reason
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Copy for Reason
[src]

impl From<u32> for Reason
[src]

Performs the conversion.

impl From<Reason> for u32
[src]

Performs the conversion.

impl Debug for Reason
[src]

Formats the value using the given formatter. Read more

impl Display for Reason
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl Send for Reason

impl Sync for Reason

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

Creates owned data from borrowed data, usually by cloning. Read more

🔬 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> From for T
[src]

Performs the conversion.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

Converts the given value to a String. Read more

impl<T, U> Into for T where
    U: From<T>, 
[src]

Performs the conversion.

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

🔬 This is a nightly-only experimental API. (try_from)

Performs the conversion.

impl<T> Borrow for T where
    T: ?Sized
[src]

Immutably borrows from an owned value. Read more

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

🔬 This is a nightly-only experimental API. (try_from)

Performs the conversion.

impl<T> BorrowMut for T where
    T: ?Sized
[src]

Mutably borrows from an owned value. Read more

impl<T> Any for T where
    T: 'static + ?Sized
[src]

🔬 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]

Compare self to key and return true if they are equal.