[−][src]Enum smolscale::OnError
The strategy used to recover from errors that a task returns.
Variants
Implementations
impl OnError
[src]
pub fn custom(f: impl FnOnce(&Error) -> OnError + 'static + Send + Sync) -> Self
[src]
Creates an error strategy based on the given closure. Convenience wrapper over OnError::Custom
that boxes the closure for you.
pub fn ignore_with(f: impl FnOnce(&Error) + 'static + Send + Sync) -> Self
[src]
Creates an error strategy that runs the given closure and ignores the error.
pub fn propagate_with(f: impl FnOnce(&Error) + 'static + Send + Sync) -> Self
[src]
Creates an error strategy that runs the given closure and propagates it to the nursery.
Auto Trait Implementations
impl !RefUnwindSafe for OnError
[src]
impl Send for OnError
[src]
impl Sync for OnError
[src]
impl Unpin for OnError
[src]
impl !UnwindSafe for OnError
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,