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