pub enum RingError {
MagicMismatch,
VersionMismatch,
CapacityMismatch {
descriptor: u16,
mapped: usize,
},
PointerOutOfBounds {
ptr: u16,
capacity: u16,
},
RegionLength {
len: usize,
},
FrameTooLarge {
len: usize,
max: usize,
},
BufferTooSmall {
len: usize,
needed: usize,
},
Faulted,
NonCoherentRegion,
}Expand description
Why a ring could not be opened, or a frame could not be moved.
Variants§
MagicMismatch
The region does not start with the CDBG magic.
VersionMismatch
The descriptor is a CDBG version this crate cannot read.
CapacityMismatch
The descriptor’s capacity does not fit the region.
Fields
PointerOutOfBounds
A ring cursor lies outside [DATA_START, capacity).
RegionLength
A region to initialize is too short for a descriptor and one frame, or
longer than a u16 capacity can describe.
FrameTooLarge
The frame can never fit: it is longer than one packet carries, or than the
ring’s data area. It was dropped and Flags::Overflow latched.
BufferTooSmall
The next frame is longer than the receive buffer; it was left unread.
Faulted
The writer latched Flags::Error; the ring accepts no more frames.
NonCoherentRegion
The region is not cache-coherent. The CDBG layout shares cache lines
between writer- and reader-owned fields, so it needs a coherent mapping.
Trait Implementations§
impl Copy for RingError
impl Eq for RingError
Source§impl Error for RingError
impl Error for RingError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()