pub enum WireError {
BufferTooSmall {
needed: usize,
available: usize,
},
Incomplete {
needed_min: usize,
available: usize,
},
InvalidVarInt,
UnknownFrameType(u8),
PayloadTooLarge {
declared: u64,
max_allowed: u64,
},
}Expand description
Errors that occur during frame encoding or decoding.
Variants§
BufferTooSmall
The output buffer is too small to hold the encoded data.
Fields
Incomplete
The input buffer does not contain enough data for a complete decode. This is NOT a fatal error — it means “read more bytes and try again”.
Fields
InvalidVarInt
A VarInt encoding is malformed (overflow or invalid prefix).
UnknownFrameType(u8)
The frame type nibble does not map to a known FrameType.
PayloadTooLarge
The payload length declared in the header exceeds the configured maximum.
Trait Implementations§
impl Copy for WireError
impl Eq for WireError
impl StructuralPartialEq for WireError
Auto Trait Implementations§
impl Freeze for WireError
impl RefUnwindSafe for WireError
impl Send for WireError
impl Sync for WireError
impl Unpin for WireError
impl UnsafeUnpin for WireError
impl UnwindSafe for WireError
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