pub struct QueueConfig {
pub ring_size: u32,
pub max_msg_size: u32,
pub schema: u32,
}Expand description
Configuration for a kernel queue.
Fields§
§ring_size: u32Ring buffer size (must be power of 2).
max_msg_size: u32Maximum message size in bytes.
schema: u32WIT type ID for message schema validation (0 = no validation).
Implementations§
Source§impl QueueConfig
impl QueueConfig
Sourcepub const fn new(ring_size: u32, max_msg_size: u32) -> Self
pub const fn new(ring_size: u32, max_msg_size: u32) -> Self
Create a new queue configuration.
§Arguments
ring_size- Number of ring entries (must be power of 2)max_msg_size- Maximum message size in bytes
Sourcepub const fn with_schema(ring_size: u32, max_msg_size: u32, schema: u32) -> Self
pub const fn with_schema(ring_size: u32, max_msg_size: u32, schema: u32) -> Self
Create a configuration with schema validation.
Sourcepub fn required_memory(&self) -> usize
pub fn required_memory(&self) -> usize
Calculate the required backing memory size.
Trait Implementations§
Source§impl Clone for QueueConfig
impl Clone for QueueConfig
Source§fn clone(&self) -> QueueConfig
fn clone(&self) -> QueueConfig
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 QueueConfig
impl Debug for QueueConfig
Source§impl Default for QueueConfig
impl Default for QueueConfig
impl Copy for QueueConfig
Auto Trait Implementations§
impl Freeze for QueueConfig
impl RefUnwindSafe for QueueConfig
impl Send for QueueConfig
impl Sync for QueueConfig
impl Unpin for QueueConfig
impl UnsafeUnpin for QueueConfig
impl UnwindSafe for QueueConfig
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