Retain

Trait Retain 

Source
pub trait Retain {
    type Input;

    // Required method
    fn retain(&mut self, input: Self::Input);
}
Expand description

See Retain::retain for more information.

Required Associated Types§

Source

type Input

Input

Required Methods§

Source

fn retain(&mut self, input: Self::Input)

Retains only the elements specified by the F predicate.

Implementations on Foreign Types§

Source§

impl<T> Retain for Option<T>

let mut opt = Some(1);
cl_aux::Retain::retain(&mut opt, |n| n % 2 == 0);
assert_eq!(opt, None);
Source§

type Input = fn(&T) -> bool

Source§

fn retain(&mut self, input: Self::Input)

Source§

impl<T> Retain for &mut T
where T: Retain,

Source§

type Input = <T as Retain>::Input

Source§

fn retain(&mut self, input: Self::Input)

Implementors§