pub enum FrameDecodeError {
Truncated,
UnknownFormat(u8),
UnknownKind(u8),
UnknownFlags(u8),
RunIdNotUtf8,
EmptyFrameWithPayload,
Payload(PayloadDecodeError),
}Expand description
Decode-side failures. Fail-closed by construction: unknown versions, kinds, or flag bits are errors, never best-effort skips — a frame will be replayed by a binary years younger than the one that wrote it, and that direction must be exact.
Variants§
Truncated
The bytes end before the header (or a length-prefixed field) completes.
UnknownFormat(u8)
UnknownKind(u8)
UnknownFlags(u8)
A reserved flag bit is set — written by a newer producer; refuse rather than misparse the field section.
RunIdNotUtf8
EmptyFrameWithPayload
An FrameKind::Empty frame carrying payload bytes (see
FrameEncodeError::EmptyFrameWithPayload).
Payload(PayloadDecodeError)
A v2 frame whose mandatory chunk container failed to decode.
Trait Implementations§
Source§impl Clone for FrameDecodeError
impl Clone for FrameDecodeError
Source§fn clone(&self) -> FrameDecodeError
fn clone(&self) -> FrameDecodeError
Returns a duplicate of the value. Read more
1.0.0 · 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 FrameDecodeError
impl Debug for FrameDecodeError
Source§impl Display for FrameDecodeError
impl Display for FrameDecodeError
Source§impl Error for FrameDecodeError
impl Error for FrameDecodeError
1.30.0 · 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 PartialEq for FrameDecodeError
impl PartialEq for FrameDecodeError
impl Eq for FrameDecodeError
impl StructuralPartialEq for FrameDecodeError
Auto Trait Implementations§
impl Freeze for FrameDecodeError
impl RefUnwindSafe for FrameDecodeError
impl Send for FrameDecodeError
impl Sync for FrameDecodeError
impl Unpin for FrameDecodeError
impl UnsafeUnpin for FrameDecodeError
impl UnwindSafe for FrameDecodeError
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