pub trait FilterT<F: FilterT<F, V = Self::V> = Self> {
type V: ValT;
// Required methods
fn run<'a>(
&'a self,
lut: &'a Lut<F>,
cv: Cv<'a, Self::V>,
) -> ValXs<'a, Self::V>;
fn update<'a>(
&'a self,
lut: &'a Lut<F>,
cv: Cv<'a, Self::V>,
f: Box<dyn Update<'a, Self::V> + 'a>,
) -> ValXs<'a, Self::V>;
// Provided methods
fn pipe<'a, T: 'a>(
&'a self,
lut: &'a Lut<F>,
cv: Cv<'a, Self::V>,
f: impl Fn(Cv<'a, Self::V>, Self::V) -> Results<'a, T, Exn<'a, Self::V>> + 'a,
) -> Results<'a, T, Exn<'a, Self::V>> { ... }
fn cartesian<'a>(
&'a self,
r: &'a Self,
lut: &'a Lut<F>,
cv: Cv<'a, Self::V>,
) -> BoxIter<'a, (ValX<'a, Self::V>, ValX<'a, Self::V>)> { ... }
}Expand description
Function from a value to a stream of value results.
F is the type of (natively implemented) filter functions.
Required Associated Types§
Required Methods§
Provided Methods§
Sourcefn pipe<'a, T: 'a>(
&'a self,
lut: &'a Lut<F>,
cv: Cv<'a, Self::V>,
f: impl Fn(Cv<'a, Self::V>, Self::V) -> Results<'a, T, Exn<'a, Self::V>> + 'a,
) -> Results<'a, T, Exn<'a, Self::V>>
fn pipe<'a, T: 'a>( &'a self, lut: &'a Lut<F>, cv: Cv<'a, Self::V>, f: impl Fn(Cv<'a, Self::V>, Self::V) -> Results<'a, T, Exn<'a, Self::V>> + 'a, ) -> Results<'a, T, Exn<'a, Self::V>>
For every value v returned by self.run(cv), call f(cv, v) and return all results.
This has a special optimisation for the case where only a single v is returned.
In that case, we can consume cv instead of cloning it.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.