Enum smolscale::OnError[][src]

pub enum OnError {
    Ignore,
    Propagate,
    Custom(Box<dyn FnOnce(&Error) -> OnError + Send + Sync>),
}
Expand description

The strategy used to recover from errors that a task returns.

Variants

Ignore
Propagate
Custom(Box<dyn FnOnce(&Error) -> OnError + Send + Sync>)

Tuple Fields of Custom

0: Box<dyn FnOnce(&Error) -> OnError + Send + Sync>

Implementations

Creates an error strategy based on the given closure. Convenience wrapper over OnError::Custom that boxes the closure for you.

Creates an error strategy that runs the given closure and ignores the error.

Creates an error strategy that runs the given closure and propagates it to the nursery.

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.