#[non_exhaustive]pub enum FrameDecodeError<E> {
DecoderFailed,
RetainedByteCapacity {
retained: RetainedBytes,
incoming: usize,
limit: RetainedBytes,
},
InputSizeOverflow,
Decoder(E),
RetainedContractViolation {
retained: RetainedBytes,
limit: RetainedBytes,
},
}Expand description
Why a bounded decoder driver could not admit or decode bytes.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
DecoderFailed
The decoder already observed a terminal adapter or accounting failure.
RetainedByteCapacity
The borrowed input chunk could not fit without exceeding retained bytes.
Fields
§
retained: RetainedBytesBytes retained before the rejected input.
§
limit: RetainedBytesConfigured retained-byte maximum.
InputSizeOverflow
The platform input length could not fit the fixed-width byte domain.
Decoder(E)
The protocol adapter reported a terminal decoder failure.
RetainedContractViolation
The adapter retained more memory than the configured mechanical bound.
Fields
§
retained: RetainedBytesRetained bytes reported by the adapter.
§
limit: RetainedBytesConfigured retained-byte maximum.
Trait Implementations§
Source§impl<E: Clone> Clone for FrameDecodeError<E>
impl<E: Clone> Clone for FrameDecodeError<E>
Source§impl<E: Debug> Debug for FrameDecodeError<E>
impl<E: Debug> Debug for FrameDecodeError<E>
Source§impl<E: Display> Display for FrameDecodeError<E>
impl<E: Display> Display for FrameDecodeError<E>
impl<E: Eq> Eq for FrameDecodeError<E>
Source§impl<E: Error + 'static> Error for FrameDecodeError<E>
impl<E: Error + 'static> Error for FrameDecodeError<E>
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl<E: PartialEq> PartialEq for FrameDecodeError<E>
impl<E: PartialEq> PartialEq for FrameDecodeError<E>
impl<E: PartialEq> StructuralPartialEq for FrameDecodeError<E>
Auto Trait Implementations§
impl<E> Freeze for FrameDecodeError<E>where
E: Freeze,
impl<E> RefUnwindSafe for FrameDecodeError<E>where
E: RefUnwindSafe,
impl<E> Send for FrameDecodeError<E>where
E: Send,
impl<E> Sync for FrameDecodeError<E>where
E: Sync,
impl<E> Unpin for FrameDecodeError<E>where
E: Unpin,
impl<E> UnsafeUnpin for FrameDecodeError<E>where
E: UnsafeUnpin,
impl<E> UnwindSafe for FrameDecodeError<E>where
E: UnwindSafe,
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