pub enum FrameViolation {
EmptyMessage,
TruncatedHeader {
length: usize,
},
DeclaredBeyondBound {
declared_total: u64,
bound: u64,
},
TruncatedBody {
declared_total: u64,
actual: u64,
},
TrailingBytes {
declared_total: u64,
actual: u64,
},
UndecodableBody,
}Expand description
Typed canonical-frame violations the driver detects on inbound messages.
Variants§
EmptyMessage
The binary message carried no bytes at all.
TruncatedHeader
The message ended before the ten-byte generic header completed.
DeclaredBeyondBound
The declared complete frame exceeds the active liminal frame bound.
Fields
TruncatedBody
The message ended before the declared body completed.
Fields
TrailingBytes
The message carried bytes past the declared frame (including a second concatenated frame).
Fields
UndecodableBody
The framing was valid but the canonical codec refused the body.
This variant is minted by the codec-owning adapter layer, never by the
no_std driver (which validates the self-delimiting header shape and
deliberately does not decode bodies).
Trait Implementations§
Source§impl Clone for FrameViolation
impl Clone for FrameViolation
Source§fn clone(&self) -> FrameViolation
fn clone(&self) -> FrameViolation
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 moreimpl Copy for FrameViolation
Source§impl Debug for FrameViolation
impl Debug for FrameViolation
impl Eq for FrameViolation
Source§impl PartialEq for FrameViolation
impl PartialEq for FrameViolation
impl StructuralPartialEq for FrameViolation
Auto Trait Implementations§
impl Freeze for FrameViolation
impl RefUnwindSafe for FrameViolation
impl Send for FrameViolation
impl Sync for FrameViolation
impl Unpin for FrameViolation
impl UnsafeUnpin for FrameViolation
impl UnwindSafe for FrameViolation
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.