Trait ExtractOwned

Source
pub trait ExtractOwned: for<'a> Extract<'a> { }
Expand description

A type that can be extracted from a Row without borrowing the Row.

This is primarily useful for trait bounds on functions. For example

fn extract<T: ExtractOwned>() -> T {
    let row: Row = get_row();
    T::extract_once(&row)
}

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> ExtractOwned for T
where T: for<'a> Extract<'a>,