pub enum FrameError {
ShortHeader,
ShortPayload,
PayloadTooLarge(u32),
UnknownOp(u8),
TruncatedPayload,
InvalidUtf8,
UnknownWireType(u8),
FieldTooLarge,
}Expand description
Decode-side errors. Encode never produces these unless the caller exceeded
MAX_PAYLOAD; see encode.
Variants§
ShortHeader
Fewer than FRAME_HEADER_LEN bytes in the buffer.
ShortPayload
Header parsed, but the buffer ran out before the full payload arrived. The caller should accumulate more bytes and retry.
PayloadTooLarge(u32)
Declared payload length exceeds MAX_PAYLOAD.
UnknownOp(u8)
Opcode byte is not a known Op variant.
TruncatedPayload
Payload decoding ran past the end of the buffer.
InvalidUtf8
Payload bytes that were supposed to be UTF-8 weren’t.
UnknownWireType(u8)
Value-codec type tag byte is not a known WireType.
FieldTooLarge
A length field (column count, payload sub-length, …) overflowed its
on-wire width — typically u16 for counts or u32 for text.
Trait Implementations§
Source§impl Clone for FrameError
impl Clone for FrameError
Source§fn clone(&self) -> FrameError
fn clone(&self) -> FrameError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FrameError
impl Debug for FrameError
Source§impl Display for FrameError
impl Display for FrameError
impl Eq for FrameError
Source§impl PartialEq for FrameError
impl PartialEq for FrameError
Source§fn eq(&self, other: &FrameError) -> bool
fn eq(&self, other: &FrameError) -> bool
Tests for
self and other values to be equal, and is used by ==.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