pub trait Apply<T>: IntoExpression {
type Output<F: FnMut(Self::Item) -> T>: IntoExpression<Item = T, Shape = Self::Shape>;
type ZippedWith<I: IntoExpression, F>: IntoExpression<Item = T>
where F: FnMut((Self::Item, I::Item)) -> T;
// Required methods
fn apply<F: FnMut(Self::Item) -> T>(self, f: F) -> Self::Output<F>;
fn zip_with<I: IntoExpression, F>(
self,
expr: I,
f: F,
) -> Self::ZippedWith<I, F>
where F: FnMut((Self::Item, I::Item)) -> T;
}Expand description
Trait for applying a closure and returning an existing array or an expression.
Required Associated Types§
sourcetype Output<F: FnMut(Self::Item) -> T>: IntoExpression<Item = T, Shape = Self::Shape>
type Output<F: FnMut(Self::Item) -> T>: IntoExpression<Item = T, Shape = Self::Shape>
The resulting type after applying a closure.
sourcetype ZippedWith<I: IntoExpression, F>: IntoExpression<Item = T>
where
F: FnMut((Self::Item, I::Item)) -> T
type ZippedWith<I: IntoExpression, F>: IntoExpression<Item = T> where F: FnMut((Self::Item, I::Item)) -> T
The resulting type after zipping elements and applying a closure.
Required Methods§
sourcefn apply<F: FnMut(Self::Item) -> T>(self, f: F) -> Self::Output<F>
fn apply<F: FnMut(Self::Item) -> T>(self, f: F) -> Self::Output<F>
Returns the array or an expression with the given closure applied to each element.
sourcefn zip_with<I: IntoExpression, F>(self, expr: I, f: F) -> Self::ZippedWith<I, F>
fn zip_with<I: IntoExpression, F>(self, expr: I, f: F) -> Self::ZippedWith<I, F>
Returns the array or an expression with the given closure applied to zipped element pairs.
Object Safety§
This trait is not object safe.