pub struct PrefixFilter<Tuple, Func: Fn(&Tuple) -> bool> { /* private fields */ }
Expand description
A treefrog leaper that tests each of the tuples from the main
input (the “prefix”). Use like PrefixFilter::from(|tuple| ...)
; if the closure returns true, then the tuple is
retained, else it will be ignored. This leaper can be used in
isolation in which case it just acts like a filter on the
input (the “proposed value” will be ()
type).
Implementations§
Trait Implementations§
Source§impl<'leap, Tuple, Val, Func> Leaper<'leap, Tuple, Val> for PrefixFilter<Tuple, Func>
impl<'leap, Tuple, Val, Func> Leaper<'leap, Tuple, Val> for PrefixFilter<Tuple, Func>
Auto Trait Implementations§
impl<Tuple, Func> Freeze for PrefixFilter<Tuple, Func>where
Func: Freeze,
impl<Tuple, Func> RefUnwindSafe for PrefixFilter<Tuple, Func>where
Func: RefUnwindSafe,
Tuple: RefUnwindSafe,
impl<Tuple, Func> Send for PrefixFilter<Tuple, Func>
impl<Tuple, Func> Sync for PrefixFilter<Tuple, Func>
impl<Tuple, Func> Unpin for PrefixFilter<Tuple, Func>
impl<Tuple, Func> UnwindSafe for PrefixFilter<Tuple, Func>where
Func: UnwindSafe,
Tuple: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more