Extract

Trait Extract 

Source
pub trait Extract<A: Access<T>, T>:
    Access<T>
    + Sized
    + TryExtract<A, T> {
    // Required method
    fn extract(self) -> (A, <A as Access<T>>::RemainderFrom<Self>);
}
Expand description

Trait for compile-time checked extraction from one access type to another.

Returns both the extracted value (in target access type) and the remainder.

Required Methods§

Source

fn extract(self) -> (A, <A as Access<T>>::RemainderFrom<Self>)

Extract a value into target type and remainder parts.

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> Extract<T, T> for T

Source§

impl<T, A: Access<T>> Extract<Option<T>, T> for A
where Self: TryExtract<Option<T>, T>,

Source§

impl<T, A: Access<T>> Extract<PhantomData<T>, T> for A
where Self: TryExtract<PhantomData<T>, T>,