Skip to main content

Reason

Enum Reason 

Source
pub enum Reason<U>
where U: Encoder + Decoder,
{ Service, Io(Option<Error>), Encoder(<U as Encoder>::Error), Decoder(<U as Decoder>::Error), KeepAlive, ReadTimeout, WriteTimeout, }
Expand description

Reason a dispatcher is stopping.

Variants§

§

Service

Service error

§

Io(Option<Error>)

The transport disconnected.

The value contains the underlying I/O error when one was available. If the peer closed its side cleanly while undecodable bytes were left in the read buffer, the stream was truncated and the value contains an io::ErrorKind::UnexpectedEof error.

§

Encoder(<U as Encoder>::Error)

A service response could not be encoded.

§

Decoder(<U as Decoder>::Error)

Incoming bytes could not be decoded.

§

KeepAlive

The connection exceeded its keep-alive timeout.

§

ReadTimeout

A complete frame was not received within the configured read deadline.

§

WriteTimeout

Write backpressure stayed enabled for longer than the configured write timeout.

Trait Implementations§

Source§

impl<U> Debug for Reason<U>
where U: Encoder + Decoder, <U as Encoder>::Error: Debug, <U as Decoder>::Error: Debug,

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<U> !RefUnwindSafe for Reason<U>

§

impl<U> !UnwindSafe for Reason<U>

§

impl<U> Freeze for Reason<U>
where <U as Encoder>::Error: Freeze, <U as Decoder>::Error: Freeze,

§

impl<U> Send for Reason<U>
where <U as Encoder>::Error: Send, <U as Decoder>::Error: Send,

§

impl<U> Sync for Reason<U>
where <U as Encoder>::Error: Sync, <U as Decoder>::Error: Sync,

§

impl<U> Unpin for Reason<U>
where <U as Encoder>::Error: Unpin, <U as Decoder>::Error: Unpin,

§

impl<U> UnsafeUnpin for Reason<U>
where <U as Encoder>::Error: UnsafeUnpin, <U as Decoder>::Error: UnsafeUnpin,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.