Struct Filtering

Source
pub struct Filtering<'p, T: 'p, P: Fn(&T) -> bool + 'p> { /* private fields */ }
Expand description

The filtering transducer that passes through elements that satisfy a predicate.

Implementations§

Source§

impl<'p, T, P: Fn(&T) -> bool + 'p> Filtering<'p, T, P>

Source

pub fn new(p: &'p P) -> Filtering<'p, T, P>

The filtering transducer passes through all elements for which the predicate p is true.

Trait Implementations§

Source§

impl<'p, R: 'p, T: 'p, P: Fn(&T) -> bool + 'p> Transducer<'p, R, T, T> for Filtering<'p, T, P>

Source§

type Step = FilteringStep<'p, R, T, P>

The type of step that application of the transducer produces.
Source§

fn apply<Step: Fn(R, T) -> R + 'p>( &self, step: Step, ) -> FilteringStep<'p, R, T, P>

Applies the transducer to the step function to obtain a new step function.

Auto Trait Implementations§

§

impl<'p, T, P> Freeze for Filtering<'p, T, P>

§

impl<'p, T, P> RefUnwindSafe for Filtering<'p, T, P>
where P: RefUnwindSafe,

§

impl<'p, T, P> Send for Filtering<'p, T, P>
where P: Sync,

§

impl<'p, T, P> Sync for Filtering<'p, T, P>
where P: Sync,

§

impl<'p, T, P> Unpin for Filtering<'p, T, P>

§

impl<'p, T, P> UnwindSafe for Filtering<'p, T, P>
where P: RefUnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.