Trait proc_bitfield::Try

source ·
pub trait Try {
    type Output;
    type WithOutput<T>: Try;

    // Required method
    fn from_output(output: Self::Output) -> Self;
}
Expand description

Equivalent of core::ops::Try that doesn’t require nightly and allows changing the output type using a GAT (logically depends on core::ops::Try, but doesn’t have an explicit dependency as it’s unstable).

Automatically implemented for Option and Result<T, E>.

Required Associated Types§

Required Methods§

source

fn from_output(output: Self::Output) -> Self

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<T> Try for Option<T>

§

type Output = T

§

type WithOutput<U> = Option<U>

source§

fn from_output(output: Self::Output) -> Self

source§

impl<T, E> Try for Result<T, E>

§

type Output = T

§

type WithOutput<U> = Result<U, E>

source§

fn from_output(output: Self::Output) -> Self

Implementors§