Enum bastion_executor::run_queue::Steal [−][src]
pub enum Steal<T> {
Empty,
Success(T),
Retry,
}
Expand description
Possible outcomes of a steal operation.
Variants
Empty
The queue was empty at the time of stealing.
Success(T)
At least one task was successfully stolen.
Retry
The steal operation needs to be retried.
Implementations
Returns true
if at least one task was stolen.
If no task was stolen, attempts another steal operation.
Returns this steal result if it is Success
. Otherwise, closure f
is invoked and then:
- If the second steal resulted in
Success
, it is returned. - If both steals were unsuccessful but any resulted in
Retry
, thenRetry
is returned. - If both resulted in
None
, thenNone
is returned.
Trait Implementations
Auto Trait Implementations
impl<T> RefUnwindSafe for Steal<T> where
T: RefUnwindSafe,
impl<T> UnwindSafe for Steal<T> where
T: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more