#[repr(C)]pub struct RingEntry {
pub length: u32,
pub priority: u8,
pub flags: u8,
pub sequence: u16,
}Expand description
A lock-free ring buffer entry.
Each entry contains a header followed by payload data. The header includes length, priority, flags, and sequence number for ordering.
Fields§
§length: u32Length of the payload in bytes.
priority: u8Message priority (0-3).
flags: u8Entry flags.
sequence: u16Sequence number for ordering.
Implementations§
Source§impl RingEntry
impl RingEntry
Sourcepub const HEADER_SIZE: usize
pub const HEADER_SIZE: usize
Size of a ring entry header in bytes.
Sourcepub const FLAG_DESCRIPTOR: u8
pub const FLAG_DESCRIPTOR: u8
Flag indicating this entry contains a descriptor instead of inline data.
Sourcepub const FLAG_CONTINUATION: u8
pub const FLAG_CONTINUATION: u8
Flag indicating this entry is part of a multi-entry message.
Sourcepub const FLAG_FINAL: u8
pub const FLAG_FINAL: u8
Flag indicating this is the final entry of a multi-entry message.
Sourcepub const fn new_inline(
length: u32,
priority: MsgPriority,
sequence: u16,
) -> Self
pub const fn new_inline( length: u32, priority: MsgPriority, sequence: u16, ) -> Self
Create a new ring entry for inline data.
Sourcepub const fn new_descriptor(priority: MsgPriority, sequence: u16) -> Self
pub const fn new_descriptor(priority: MsgPriority, sequence: u16) -> Self
Create a new ring entry for a descriptor.
Sourcepub const fn is_descriptor(&self) -> bool
pub const fn is_descriptor(&self) -> bool
Check if this entry contains a descriptor.
Sourcepub const fn is_continuation(&self) -> bool
pub const fn is_continuation(&self) -> bool
Check if this is a continuation entry.
Sourcepub fn priority(&self) -> MsgPriority
pub fn priority(&self) -> MsgPriority
Get the priority as MsgPriority.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RingEntry
impl RefUnwindSafe for RingEntry
impl Send for RingEntry
impl Sync for RingEntry
impl Unpin for RingEntry
impl UnsafeUnpin for RingEntry
impl UnwindSafe for RingEntry
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