#[non_exhaustive]pub enum FrameError {
Truncated,
BadKind,
LengthMismatch,
EmptyRange,
OffsetOverflow,
TooLarge,
}Expand description
Why a binary frame was refused.
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.
Truncated
Fewer bytes than the header needs.
BadKind
The first byte is not a known frame kind.
LengthMismatch
The len field disagrees with the number of payload bytes.
EmptyRange
A range of zero bytes carries nothing and is refused.
OffsetOverflow
offset + len does not fit in a u64.
TooLarge
len exceeds MAX_PAYLOAD.
Trait Implementations§
Source§impl Clone for FrameError
impl Clone for FrameError
impl Copy for FrameError
Source§impl Debug for FrameError
impl Debug for FrameError
impl Eq for FrameError
Source§impl PartialEq for FrameError
impl PartialEq for FrameError
impl StructuralPartialEq for FrameError
Auto Trait Implementations§
impl Freeze for FrameError
impl RefUnwindSafe for FrameError
impl Send for FrameError
impl Sync for FrameError
impl Unpin for FrameError
impl UnsafeUnpin for FrameError
impl UnwindSafe for FrameError
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