pub struct Producer { /* private fields */ }Expand description
Queue producer.
A process holding Producer owns pushes into the queue.
Implementations§
Source§impl Producer
impl Producer
Sourcepub fn create_or_open(capacity: usize) -> Result<Self>
pub fn create_or_open(capacity: usize) -> Result<Self>
Create the queue if missing, or open the existing queue when capacity matches.
Capacity must be a non-zero power of two.
Sourcepub fn push(&self, value: [u8; 48]) -> Result<(), PushError>
pub fn push(&self, value: [u8; 48]) -> Result<(), PushError>
Push one 48-byte value.
Returns PushError::Full when the bounded queue has no free slot.
Sourcepub fn stats(&self) -> QueueStats
pub fn stats(&self) -> QueueStats
Current queue statistics.
Auto Trait Implementations§
impl !Send for Producer
impl !Sync for Producer
impl Freeze for Producer
impl RefUnwindSafe for Producer
impl Unpin for Producer
impl UnsafeUnpin for Producer
impl UnwindSafe for Producer
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