pub struct ExprBuilder<T, E>{ /* private fields */ }Expand description
Expression builder for creating complex expressions with a fluent interface
Implementations§
Source§impl<'a, T: Clone> ExprBuilder<T, ArrayExpr<'a, T>>
impl<'a, T: Clone> ExprBuilder<T, ArrayExpr<'a, T>>
Sourcepub fn from_array(array: &'a Array<T>) -> Self
pub fn from_array(array: &'a Array<T>) -> Self
Start building from an array
Source§impl<T, E> ExprBuilder<T, E>
impl<T, E> ExprBuilder<T, E>
Sourcepub fn map<F: Fn(T) -> T>(self, op: F) -> ExprBuilder<T, UnaryExpr<T, E, F>>
pub fn map<F: Fn(T) -> T>(self, op: F) -> ExprBuilder<T, UnaryExpr<T, E, F>>
Apply a unary operation
Sourcepub fn zip_with<E2, F>(
self,
other: E2,
op: F,
) -> Result<ExprBuilder<T, BinaryExpr<T, E, E2, F>>>
pub fn zip_with<E2, F>( self, other: E2, op: F, ) -> Result<ExprBuilder<T, BinaryExpr<T, E, E2, F>>>
Apply a binary operation with another expression
Sourcepub fn scalar<F: Fn(T, T) -> T>(
self,
scalar: T,
op: F,
) -> ExprBuilder<T, ScalarExpr<T, E, F>>
pub fn scalar<F: Fn(T, T) -> T>( self, scalar: T, op: F, ) -> ExprBuilder<T, ScalarExpr<T, E, F>>
Apply a scalar operation
Sourcepub fn add_scalar(
self,
scalar: T,
) -> ExprBuilder<T, ScalarExpr<T, E, impl Fn(T, T) -> T>>where
T: Add<Output = T>,
pub fn add_scalar(
self,
scalar: T,
) -> ExprBuilder<T, ScalarExpr<T, E, impl Fn(T, T) -> T>>where
T: Add<Output = T>,
Add a scalar value
Sourcepub fn mul_scalar(
self,
scalar: T,
) -> ExprBuilder<T, ScalarExpr<T, E, impl Fn(T, T) -> T>>where
T: Mul<Output = T>,
pub fn mul_scalar(
self,
scalar: T,
) -> ExprBuilder<T, ScalarExpr<T, E, impl Fn(T, T) -> T>>where
T: Mul<Output = T>,
Multiply by a scalar value
Source§impl<E: Expr<f64>> ExprBuilder<f64, E>
impl<E: Expr<f64>> ExprBuilder<f64, E>
Sourcepub fn abs(self) -> ExprBuilder<f64, UnaryExpr<f64, E, impl Fn(f64) -> f64>>
pub fn abs(self) -> ExprBuilder<f64, UnaryExpr<f64, E, impl Fn(f64) -> f64>>
Apply absolute value
Sourcepub fn sqrt(self) -> ExprBuilder<f64, UnaryExpr<f64, E, impl Fn(f64) -> f64>>
pub fn sqrt(self) -> ExprBuilder<f64, UnaryExpr<f64, E, impl Fn(f64) -> f64>>
Apply square root
Auto Trait Implementations§
impl<T, E> Freeze for ExprBuilder<T, E>where
E: Freeze,
impl<T, E> RefUnwindSafe for ExprBuilder<T, E>where
E: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, E> Send for ExprBuilder<T, E>
impl<T, E> Sync for ExprBuilder<T, E>
impl<T, E> Unpin for ExprBuilder<T, E>
impl<T, E> UnsafeUnpin for ExprBuilder<T, E>where
E: UnsafeUnpin,
impl<T, E> UnwindSafe for ExprBuilder<T, E>where
E: UnwindSafe,
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.