Struct datafrog::ValueFilter [−][src]
A treefrog leaper based on a predicate of prefix and value.
Use like ValueFilter::from(|tuple, value| ...)
. The closure
should return true if value
ought to be retained. The
value
will be a value proposed elsewhere by an extend_with
leaper.
This leaper cannot be used in isolation, it must be combined with other leapers.
Implementations
impl<'leap, Tuple, Val, Func> ValueFilter<Tuple, Val, Func> where
Func: Fn(&Tuple, &Val) -> bool,
[src]
Func: Fn(&Tuple, &Val) -> bool,
Trait Implementations
impl<'leap, Tuple, Val, Func> Leaper<'leap, Tuple, Val> for ValueFilter<Tuple, Val, Func> where
Func: Fn(&Tuple, &Val) -> bool,
[src]
Func: Fn(&Tuple, &Val) -> 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.
Auto Trait Implementations
impl<Tuple, Val, Func> RefUnwindSafe for ValueFilter<Tuple, Val, Func> where
Func: RefUnwindSafe,
Tuple: RefUnwindSafe,
Val: RefUnwindSafe,
Func: RefUnwindSafe,
Tuple: RefUnwindSafe,
Val: RefUnwindSafe,
impl<Tuple, Val, Func> Send for ValueFilter<Tuple, Val, Func> where
Func: Send,
Tuple: Send,
Val: Send,
Func: Send,
Tuple: Send,
Val: Send,
impl<Tuple, Val, Func> Sync for ValueFilter<Tuple, Val, Func> where
Func: Sync,
Tuple: Sync,
Val: Sync,
Func: Sync,
Tuple: Sync,
Val: Sync,
impl<Tuple, Val, Func> Unpin for ValueFilter<Tuple, Val, Func> where
Func: Unpin,
Tuple: Unpin,
Val: Unpin,
Func: Unpin,
Tuple: Unpin,
Val: Unpin,
impl<Tuple, Val, Func> UnwindSafe for ValueFilter<Tuple, Val, Func> where
Func: UnwindSafe,
Tuple: UnwindSafe,
Val: UnwindSafe,
Func: UnwindSafe,
Tuple: UnwindSafe,
Val: 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>,