Skip to main content

Extract

Trait Extract 

Source
pub trait Extract {
    type Target: Clone;

    // Required method
    fn extract_into(&self, buf: &mut Vec<Self::Target>);

    // Provided method
    fn extract(&self) -> Vec<Self::Target> { ... }
}
Expand description

Extract one or more target values from a reference.

Required Associated Types§

Source

type Target: Clone

Extraction target.

Required Methods§

Source

fn extract_into(&self, buf: &mut Vec<Self::Target>)

Append extracted values to buf.

Provided Methods§

Source

fn extract(&self) -> Vec<Self::Target>

Extract into a newly allocated vector.

Implementors§