Type Alias SendFrameError

Source
pub type SendFrameError<S> = ErrorAndSerializer<SendFrameErrorReason, S>;
Expand description

Errors returned by SendFrameContext::send_frame.

Aliased Type§

struct SendFrameError<S> {
    pub error: SendFrameErrorReason,
    pub serializer: S,
}

Fields§

§error: SendFrameErrorReason

The error observed.

§serializer: S

The serializer accompanying the error.

Implementations

Source§

impl<E, I, O> ErrorAndSerializer<E, Nested<I, O>>

Source

pub fn into_inner(self) -> ErrorAndSerializer<E, I>

A convenience function for dealing with [Nested] serializers.

Equivalent to using ErrorAndSerializer::map_serializer.

Source§

impl<E, S> ErrorAndSerializer<E, S>

Source

pub fn map_serializer<N, F: FnOnce(S) -> N>( self, f: F, ) -> ErrorAndSerializer<E, N>

Changes the serializer type.

Source

pub fn map_err<N, F: FnOnce(E) -> N>(self, f: F) -> ErrorAndSerializer<N, S>

Changes the error type.

Source

pub fn err_into<N: From<E>>(self) -> ErrorAndSerializer<N, S>

Changes the error type using Into::into.

Source

pub fn into_err(self) -> E

Consumes this pair and returns only the error, dropping the serializer.

Trait Implementations

Source§

impl<E: Debug, S: Debug> Debug for ErrorAndSerializer<E, S>

Source§

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

Formats the value using the given formatter. Read more
Source§

impl<E: PartialEq, S: PartialEq> PartialEq for ErrorAndSerializer<E, S>

Source§

fn eq(&self, other: &ErrorAndSerializer<E, S>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<E: Eq, S: Eq> Eq for ErrorAndSerializer<E, S>

Source§

impl<E, S> StructuralPartialEq for ErrorAndSerializer<E, S>