Skip to main content

TryElse

Trait TryElse 

Source
pub trait TryElse<T> {
    // Required method
    fn unwrap_or_try_else<F, R>(self, f: F) -> R
       where F: FnOnce() -> R,
             R: Try<Output = T>;
}

Required Methods§

Source

fn unwrap_or_try_else<F, R>(self, f: F) -> R
where F: FnOnce() -> R, R: Try<Output = T>,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<T, U> TryElse<T> for U
where U: Try<Output = T>,