pub enum Error {
BufferTooSmall {
required: usize,
provided: usize,
},
BadMagic,
BadHeaderLen {
header_len: usize,
},
BadPayloadLen {
payload_len: usize,
},
Truncated,
UnknownFlags {
flags: u16,
},
}Expand description
Errors returned by v1 envelope encode/decode helpers.
These errors reflect structural problems with the envelope (magic bytes, lengths, and flag bits). They do not indicate anything about the correctness or meaning of the payload bytes beyond the declared length.
Variants§
BufferTooSmall
Output buffer is smaller than required.
Fields
BadMagic
Magic bytes did not match the expected v1 envelope prefix.
BadHeaderLen
Header length is invalid or unsupported.
BadPayloadLen
Payload length is invalid (e.g. would overflow slot capacity).
Truncated
Input did not contain enough bytes to decode a full header/payload.
UnknownFlags
Header contains unknown/unsupported flag bits.
Trait Implementations§
impl Copy for Error
impl Eq for Error
impl StructuralPartialEq for Error
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnwindSafe for Error
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