pub enum DecodeMessageError<'a, C: Decoder> {
DecodingFailure(C::Error<'a>),
DecodingRemainder {
message: C::Message<'a>,
remainder: Secret<&'a [u8]>,
},
MessageTooLong {
initial: Secret<&'a [u8]>,
},
MessagePoisoned {
discarded: Secret<&'a [u8]>,
},
}Expand description
An error returned by Fragmentizer::decode_message.
Variants§
DecodingFailure(C::Error<'a>)
The decoder failed decoding the message.
DecodingRemainder
Not all bytes of the message were used when decoding the message.
MessageTooLong
Max message size was exceeded and bytes were dropped.
MessagePoisoned
The message was explicitly poisoned to prevent decoding.
Trait Implementations§
Source§impl<'a, C: Clone + Decoder> Clone for DecodeMessageError<'a, C>
impl<'a, C: Clone + Decoder> Clone for DecodeMessageError<'a, C>
Source§fn clone(&self) -> DecodeMessageError<'a, C>
fn clone(&self) -> DecodeMessageError<'a, C>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<'a, C: Eq + Decoder> Eq for DecodeMessageError<'a, C>
impl<'a, C: Decoder> StructuralPartialEq for DecodeMessageError<'a, C>
Auto Trait Implementations§
impl<'a, C> Freeze for DecodeMessageError<'a, C>
impl<'a, C> RefUnwindSafe for DecodeMessageError<'a, C>
impl<'a, C> Send for DecodeMessageError<'a, C>
impl<'a, C> Sync for DecodeMessageError<'a, C>
impl<'a, C> Unpin for DecodeMessageError<'a, C>
impl<'a, C> UnsafeUnpin for DecodeMessageError<'a, C>
impl<'a, C> UnwindSafe for DecodeMessageError<'a, C>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more