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.
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.