Struct nolock::queues::mpsc::jiffy::Sender [−][src]
pub struct Sender<T> { /* fields omitted */ }
Expand description
One of the Sender, created by calling queue
Implementations
Checks if the Queue has been closed by the Consumer
Example:
let (rx, tx) = jiffy::queue::<usize>(); // The receiver gets dropped and is therefore now considered closed drop(rx); assert_eq!(true, tx.is_closed());
Enqueues the given Data on the queue
Returns
If the Data was sucessfully enqueued Ok
will be returned, otherwise
it will return the right Error according to the EnqueueError
.
However as this is an unbounded-Queue, the only real reason for a
failure is when the receiving Side was dropped/closed.
Example
let (rx, tx) = jiffy::queue::<usize>(); // Enqueue some Data tx.enqueue(13); tx.enqueue(14); tx.enqueue(15);
Trait Implementations
Auto Trait Implementations
impl<T> RefUnwindSafe for Sender<T>
impl<T> !UnwindSafe for Sender<T>