Extract

Trait Extract 

Source
pub trait Extract<T> {
    type Error;

    // Required method
    fn extract(&self) -> Result<T, Self::Error>;

    // Provided method
    fn extract_always(&self) -> T
       where Self: Extract<T, Error = Infallible> { ... }
}

Required Associated Types§

Required Methods§

Source

fn extract(&self) -> Result<T, Self::Error>

Provided Methods§

Source

fn extract_always(&self) -> T
where Self: Extract<T, Error = Infallible>,

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<C, T> Extract<T> for C
where T: FromContext<C>,

Source§

type Error = <T as FromContext<C>>::Error