Struct datafrog::PrefixFilter [−][src]
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
impl<'leap, Tuple, Func> PrefixFilter<Tuple, Func> where
Func: Fn(&Tuple) -> bool,
[src]
Func: Fn(&Tuple) -> bool,
Trait Implementations
impl<'leap, Tuple, Val, Func> Leaper<'leap, Tuple, Val> for PrefixFilter<Tuple, Func> where
Func: Fn(&Tuple) -> bool,
[src]
Func: Fn(&Tuple) -> bool,
fn count(&mut self, prefix: &Tuple) -> usize
[src]
Estimates the number of proposed values.
fn propose(&mut self, _prefix: &Tuple, _values: &mut Vec<&'leap Val>)
[src]
Populates values
with proposed values.
fn intersect(&mut self, _prefix: &Tuple, _values: &mut Vec<&'leap Val>)
[src]
Restricts values
to proposed values.
impl<'leap, Tuple, Func> Leapers<'leap, Tuple, ()> for PrefixFilter<Tuple, Func> where
Func: Fn(&Tuple) -> bool,
[src]
Func: Fn(&Tuple) -> bool,
Auto Trait Implementations
impl<Tuple, Func> RefUnwindSafe for PrefixFilter<Tuple, Func> where
Func: RefUnwindSafe,
Tuple: RefUnwindSafe,
Func: RefUnwindSafe,
Tuple: RefUnwindSafe,
impl<Tuple, Func> Send for PrefixFilter<Tuple, Func> where
Func: Send,
Tuple: Send,
Func: Send,
Tuple: Send,
impl<Tuple, Func> Sync for PrefixFilter<Tuple, Func> where
Func: Sync,
Tuple: Sync,
Func: Sync,
Tuple: Sync,
impl<Tuple, Func> Unpin for PrefixFilter<Tuple, Func> where
Func: Unpin,
Tuple: Unpin,
Func: Unpin,
Tuple: Unpin,
impl<Tuple, Func> UnwindSafe for PrefixFilter<Tuple, Func> where
Func: UnwindSafe,
Tuple: UnwindSafe,
Func: UnwindSafe,
Tuple: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,