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>>
impl<E, I, O> ErrorAndSerializer<E, Nested<I, O>>
Sourcepub fn into_inner(self) -> ErrorAndSerializer<E, I>
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>
impl<E, S> ErrorAndSerializer<E, S>
Sourcepub fn map_serializer<N, F>(self, f: F) -> ErrorAndSerializer<E, N>where
F: FnOnce(S) -> N,
pub fn map_serializer<N, F>(self, f: F) -> ErrorAndSerializer<E, N>where
F: FnOnce(S) -> N,
Changes the serializer type.
Sourcepub fn map_err<N, F>(self, f: F) -> ErrorAndSerializer<N, S>where
F: FnOnce(E) -> N,
pub fn map_err<N, F>(self, f: F) -> ErrorAndSerializer<N, S>where
F: FnOnce(E) -> N,
Changes the error type.
Sourcepub fn err_into<N>(self) -> ErrorAndSerializer<N, S>where
N: From<E>,
pub fn err_into<N>(self) -> ErrorAndSerializer<N, S>where
N: From<E>,
Changes the error type using Into::into
.