Struct futures_checkout::OrderedCheckout
[−]
[src]
pub struct OrderedCheckout<T> { /* fields omitted */ }
The OrderedCheckout
object allows multiple consumers to check out and
return an object, queueing consumers when the object is not available and
waking them in order when it becomes available.
Methods
impl<T> OrderedCheckout<T>
[src]
fn new(item: T) -> OrderedCheckout<T>
[src]
Construct a new OrderedCheckout
with the provided underlying object.
fn checkout<'me>(&'me self) -> OrderedCheckoutFuture<'me, T>
[src]
Begin the process of checking out an object. For efficiency, the future does not join the queue until it is polled. This can affect the order in which the object is received.
fn into_inner(self) -> Option<T>
[src]
Consume this OrderedCheckout
and return its underlying object, if any.
Since this consumes the OrderedCheckout
it is guaranteed that there are
no outstanding waiters. Because a consumer can fail to return the object
this may return None.