Struct npnc::unbounded::spsc::Producer [−][src]
pub struct Producer<T>(_);
A producer for an unbounded SPSC wait-free queue.
Methods
impl<T> Producer<T>
[src]
impl<T> Producer<T>
pub fn produce(&self, item: T) -> Result<(), ProduceError<T>>
[src]
pub fn produce(&self, item: T) -> Result<(), ProduceError<T>>
Attempts to add the supplied item to the back of the queue.
This method returns Err
if the queue is full or has no remaining consumers.
Trait Implementations
impl<T: Debug> Debug for Producer<T>
[src]
impl<T: Debug> Debug for Producer<T>
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<T> Drop for Producer<T>
[src]
impl<T> Drop for Producer<T>
impl<T> Send for Producer<T> where
T: Send,
[src]
impl<T> Send for Producer<T> where
T: Send,