Struct Reason

struct Reason(_)

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.

See Error Codes in the spec.

Implementations

impl Reason

fn description(self: &Self) -> &str

Get a string description of the error code.

impl Clone for Reason

fn clone(self: &Self) -> Reason

impl Copy for Reason

impl Debug for Reason

fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result

impl Display for Reason

fn fmt(self: &Self, fmt: &mut Formatter<'_>) -> Result

impl Eq for Reason

impl Freeze for Reason

impl From for Reason

fn from(src: u32) -> Reason

impl PartialEq for Reason

fn eq(self: &Self, other: &Reason) -> bool

impl RefUnwindSafe for Reason

impl Send for Reason

impl StructuralPartialEq for Reason

impl Sync for Reason

impl Unpin for Reason

impl UnsafeUnpin for Reason

impl UnwindSafe for Reason

impl<Q, K> Equivalent for Reason

fn equivalent(self: &Self, key: &K) -> bool

impl<Q, K> Equivalent for Reason

fn equivalent(self: &Self, key: &K) -> bool

impl<T> Any for Reason

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for Reason

fn borrow(self: &Self) -> &T

impl<T> BorrowMut for Reason

fn borrow_mut(self: &mut Self) -> &mut T

impl<T> CloneToUninit for Reason

unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)

impl<T> From for Reason

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> Instrument for Reason

impl<T> ToOwned for Reason

fn to_owned(self: &Self) -> T
fn clone_into(self: &Self, target: &mut T)

impl<T> ToString for Reason

fn to_string(self: &Self) -> String

impl<T> WithSubscriber for Reason

impl<T, U> Into for Reason

fn into(self: Self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom for Reason

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

impl<T, U> TryInto for Reason

fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>