Type Alias IpSendFrameError

Source
pub type IpSendFrameError<S> = ErrorAndSerializer<IpSendFrameErrorReason, S>;
Expand description

Send errors observed at or above the IP layer that carry a serializer.

Aliased Type§

struct IpSendFrameError<S> {
    pub error: IpSendFrameErrorReason,
    pub serializer: S,
}

Fields§

§error: IpSendFrameErrorReason

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>(self, f: F) -> ErrorAndSerializer<E, N>
where F: FnOnce(S) -> N,

Changes the serializer type.

Source

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

Changes the error type.

Source

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

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, S> Debug for ErrorAndSerializer<E, S>
where E: Debug, S: Debug,

Source§

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

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

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

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, S> Eq for ErrorAndSerializer<E, S>
where E: Eq, S: Eq,

Source§

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