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

Formats the value using the given formatter. Read more

Executes the destructor for this type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.