pub trait PrimOps {
Show 66 methods
// Required method
fn to_expr_result(&self) -> ExprResult;
// Provided methods
fn less(&self, rhs: impl Operand) -> ExprResult { ... }
fn less_equal(&self, rhs: impl Operand) -> ExprResult { ... }
fn greater(&self, rhs: impl Operand) -> ExprResult { ... }
fn greater_equal(&self, rhs: impl Operand) -> ExprResult { ... }
fn equal(&self, rhs: impl Operand) -> ExprResult { ... }
fn not_equal(&self, rhs: impl Operand) -> ExprResult { ... }
fn logical_and(&self, rhs: impl IntoExpr) -> ExprResult { ... }
fn logical_or(&self, rhs: impl IntoExpr) -> ExprResult { ... }
fn div(&self, rhs: impl Operand) -> ExprResult { ... }
fn truncdiv(&self, rhs: impl Operand) -> ExprResult { ... }
fn truncmod(&self, rhs: impl Operand) -> ExprResult { ... }
fn floordiv(&self, rhs: impl Operand) -> ExprResult { ... }
fn floormod(&self, rhs: impl Operand) -> ExprResult { ... }
fn indexdiv(&self, rhs: impl Operand) -> ExprResult { ... }
fn indexmod(&self, rhs: impl Operand) -> ExprResult { ... }
fn ceildiv(&self, rhs: impl Operand) -> ExprResult { ... }
fn min(&self, rhs: impl Operand) -> ExprResult { ... }
fn max(&self, rhs: impl Operand) -> ExprResult { ... }
fn pow(&self, rhs: impl IntoExpr) -> ExprResult { ... }
fn fmod(&self, rhs: impl IntoExpr) -> ExprResult { ... }
fn atan2(&self, rhs: impl IntoExpr) -> ExprResult { ... }
fn nextafter(&self, rhs: impl IntoExpr) -> ExprResult { ... }
fn copysign(&self, rhs: impl IntoExpr) -> ExprResult { ... }
fn hypot(&self, rhs: impl IntoExpr) -> ExprResult { ... }
fn ldexp(&self, rhs: impl IntoExpr) -> ExprResult { ... }
fn bitwise_not(&self) -> ExprResult { ... }
fn floor(&self) -> ExprResult { ... }
fn ceil(&self) -> ExprResult { ... }
fn round(&self) -> ExprResult { ... }
fn nearbyint(&self) -> ExprResult { ... }
fn trunc(&self) -> ExprResult { ... }
fn abs(&self) -> ExprResult { ... }
fn isnan(&self) -> ExprResult { ... }
fn isinf(&self) -> ExprResult { ... }
fn isfinite(&self) -> ExprResult { ... }
fn likely(&self) -> ExprResult { ... }
fn assume(&self) -> ExprResult { ... }
fn clz(&self) -> ExprResult { ... }
fn exp(&self) -> ExprResult { ... }
fn exp2(&self) -> ExprResult { ... }
fn exp10(&self) -> ExprResult { ... }
fn erf(&self) -> ExprResult { ... }
fn sigmoid(&self) -> ExprResult { ... }
fn sqrt(&self) -> ExprResult { ... }
fn rsqrt(&self) -> ExprResult { ... }
fn log(&self) -> ExprResult { ... }
fn log2(&self) -> ExprResult { ... }
fn log10(&self) -> ExprResult { ... }
fn log1p(&self) -> ExprResult { ... }
fn popcount(&self) -> ExprResult { ... }
fn tanh(&self) -> ExprResult { ... }
fn tan(&self) -> ExprResult { ... }
fn cos(&self) -> ExprResult { ... }
fn cosh(&self) -> ExprResult { ... }
fn sin(&self) -> ExprResult { ... }
fn sinh(&self) -> ExprResult { ... }
fn asin(&self) -> ExprResult { ... }
fn acos(&self) -> ExprResult { ... }
fn atan(&self) -> ExprResult { ... }
fn acosh(&self) -> ExprResult { ... }
fn asinh(&self) -> ExprResult { ... }
fn atanh(&self) -> ExprResult { ... }
fn cast(&self, ty: impl Into<PrimType>) -> ExprResult { ... }
fn if_then_else(&self, t: impl IntoExpr, f: impl IntoExpr) -> ExprResult { ... }
fn select(&self, t: impl IntoExpr, f: impl IntoExpr) -> ExprResult { ... }
}Expand description
The C++ PrimExpr operations that are functions rather than Rust operators, as methods of
an ExprResult or an expression handle. Each takes an expression or a literal on the right, typed
as for the operators, and leaves self usable; the comparisons are named after the C++
functions (less, equal), since Rust’s eq and lt return a bool.
Required Methods§
Sourcefn to_expr_result(&self) -> ExprResult
fn to_expr_result(&self) -> ExprResult
This expression as an ExprResult (a reference-count increment).
Provided Methods§
Sourcefn less(&self, rhs: impl Operand) -> ExprResult
fn less(&self, rhs: impl Operand) -> ExprResult
C++ a < b (lt).
Sourcefn less_equal(&self, rhs: impl Operand) -> ExprResult
fn less_equal(&self, rhs: impl Operand) -> ExprResult
C++ a <= b (le).
Sourcefn greater(&self, rhs: impl Operand) -> ExprResult
fn greater(&self, rhs: impl Operand) -> ExprResult
C++ a > b (gt).
Sourcefn greater_equal(&self, rhs: impl Operand) -> ExprResult
fn greater_equal(&self, rhs: impl Operand) -> ExprResult
C++ a >= b (ge).
Sourcefn equal(&self, rhs: impl Operand) -> ExprResult
fn equal(&self, rhs: impl Operand) -> ExprResult
C++ a == b (eq).
Sourcefn not_equal(&self, rhs: impl Operand) -> ExprResult
fn not_equal(&self, rhs: impl Operand) -> ExprResult
C++ a != b (ne).
Sourcefn logical_and(&self, rhs: impl IntoExpr) -> ExprResult
fn logical_and(&self, rhs: impl IntoExpr) -> ExprResult
C++ a && b (logical_and).
Sourcefn logical_or(&self, rhs: impl IntoExpr) -> ExprResult
fn logical_or(&self, rhs: impl IntoExpr) -> ExprResult
C++ a || b (logical_or).
Sourcefn div(&self, rhs: impl Operand) -> ExprResult
fn div(&self, rhs: impl Operand) -> ExprResult
C++ div: a / b, truncating for integers.
Sourcefn truncdiv(&self, rhs: impl Operand) -> ExprResult
fn truncdiv(&self, rhs: impl Operand) -> ExprResult
C++ truncdiv.
Sourcefn truncmod(&self, rhs: impl Operand) -> ExprResult
fn truncmod(&self, rhs: impl Operand) -> ExprResult
C++ truncmod.
Sourcefn floordiv(&self, rhs: impl Operand) -> ExprResult
fn floordiv(&self, rhs: impl Operand) -> ExprResult
C++ floordiv.
Sourcefn floormod(&self, rhs: impl Operand) -> ExprResult
fn floormod(&self, rhs: impl Operand) -> ExprResult
C++ floormod.
Sourcefn indexdiv(&self, rhs: impl Operand) -> ExprResult
fn indexdiv(&self, rhs: impl Operand) -> ExprResult
C++ indexdiv.
Sourcefn indexmod(&self, rhs: impl Operand) -> ExprResult
fn indexmod(&self, rhs: impl Operand) -> ExprResult
C++ indexmod.
Sourcefn ceildiv(&self, rhs: impl Operand) -> ExprResult
fn ceildiv(&self, rhs: impl Operand) -> ExprResult
C++ ceildiv.
Sourcefn min(&self, rhs: impl Operand) -> ExprResult
fn min(&self, rhs: impl Operand) -> ExprResult
C++ min.
Sourcefn max(&self, rhs: impl Operand) -> ExprResult
fn max(&self, rhs: impl Operand) -> ExprResult
C++ max.
Sourcefn pow(&self, rhs: impl IntoExpr) -> ExprResult
fn pow(&self, rhs: impl IntoExpr) -> ExprResult
C++ pow(a, b) (pow).
Sourcefn fmod(&self, rhs: impl IntoExpr) -> ExprResult
fn fmod(&self, rhs: impl IntoExpr) -> ExprResult
C++ fmod(a, b) (fmod).
Sourcefn atan2(&self, rhs: impl IntoExpr) -> ExprResult
fn atan2(&self, rhs: impl IntoExpr) -> ExprResult
C++ atan2(a, b) (atan2).
Sourcefn nextafter(&self, rhs: impl IntoExpr) -> ExprResult
fn nextafter(&self, rhs: impl IntoExpr) -> ExprResult
C++ nextafter(a, b) (nextafter).
Sourcefn copysign(&self, rhs: impl IntoExpr) -> ExprResult
fn copysign(&self, rhs: impl IntoExpr) -> ExprResult
C++ copysign(a, b) (copysign).
Sourcefn hypot(&self, rhs: impl IntoExpr) -> ExprResult
fn hypot(&self, rhs: impl IntoExpr) -> ExprResult
C++ hypot(a, b) (hypot).
Sourcefn ldexp(&self, rhs: impl IntoExpr) -> ExprResult
fn ldexp(&self, rhs: impl IntoExpr) -> ExprResult
C++ ldexp(a, b) (ldexp).
Sourcefn bitwise_not(&self) -> ExprResult
fn bitwise_not(&self) -> ExprResult
C++ ~a (bitwise_not).
Sourcefn floor(&self) -> ExprResult
fn floor(&self) -> ExprResult
C++ floor.
Sourcefn ceil(&self) -> ExprResult
fn ceil(&self) -> ExprResult
C++ ceil.
Sourcefn round(&self) -> ExprResult
fn round(&self) -> ExprResult
C++ round.
Sourcefn nearbyint(&self) -> ExprResult
fn nearbyint(&self) -> ExprResult
C++ nearbyint.
Sourcefn trunc(&self) -> ExprResult
fn trunc(&self) -> ExprResult
C++ trunc.
Sourcefn abs(&self) -> ExprResult
fn abs(&self) -> ExprResult
C++ abs.
Sourcefn isnan(&self) -> ExprResult
fn isnan(&self) -> ExprResult
C++ isnan.
Sourcefn isinf(&self) -> ExprResult
fn isinf(&self) -> ExprResult
C++ isinf.
Sourcefn isfinite(&self) -> ExprResult
fn isfinite(&self) -> ExprResult
C++ isfinite.
Sourcefn likely(&self) -> ExprResult
fn likely(&self) -> ExprResult
C++ likely.
Sourcefn assume(&self) -> ExprResult
fn assume(&self) -> ExprResult
C++ assume.
Sourcefn clz(&self) -> ExprResult
fn clz(&self) -> ExprResult
C++ clz.
Sourcefn exp(&self) -> ExprResult
fn exp(&self) -> ExprResult
C++ exp.
Sourcefn exp2(&self) -> ExprResult
fn exp2(&self) -> ExprResult
C++ exp2.
Sourcefn exp10(&self) -> ExprResult
fn exp10(&self) -> ExprResult
C++ exp10.
Sourcefn erf(&self) -> ExprResult
fn erf(&self) -> ExprResult
C++ erf.
Sourcefn sigmoid(&self) -> ExprResult
fn sigmoid(&self) -> ExprResult
C++ sigmoid.
Sourcefn sqrt(&self) -> ExprResult
fn sqrt(&self) -> ExprResult
C++ sqrt.
Sourcefn rsqrt(&self) -> ExprResult
fn rsqrt(&self) -> ExprResult
C++ rsqrt.
Sourcefn log(&self) -> ExprResult
fn log(&self) -> ExprResult
C++ log.
Sourcefn log2(&self) -> ExprResult
fn log2(&self) -> ExprResult
C++ log2.
Sourcefn log10(&self) -> ExprResult
fn log10(&self) -> ExprResult
C++ log10.
Sourcefn log1p(&self) -> ExprResult
fn log1p(&self) -> ExprResult
C++ log1p.
Sourcefn popcount(&self) -> ExprResult
fn popcount(&self) -> ExprResult
C++ popcount.
Sourcefn tanh(&self) -> ExprResult
fn tanh(&self) -> ExprResult
C++ tanh.
Sourcefn tan(&self) -> ExprResult
fn tan(&self) -> ExprResult
C++ tan.
Sourcefn cos(&self) -> ExprResult
fn cos(&self) -> ExprResult
C++ cos.
Sourcefn cosh(&self) -> ExprResult
fn cosh(&self) -> ExprResult
C++ cosh.
Sourcefn sin(&self) -> ExprResult
fn sin(&self) -> ExprResult
C++ sin.
Sourcefn sinh(&self) -> ExprResult
fn sinh(&self) -> ExprResult
C++ sinh.
Sourcefn asin(&self) -> ExprResult
fn asin(&self) -> ExprResult
C++ asin.
Sourcefn acos(&self) -> ExprResult
fn acos(&self) -> ExprResult
C++ acos.
Sourcefn atan(&self) -> ExprResult
fn atan(&self) -> ExprResult
C++ atan.
Sourcefn acosh(&self) -> ExprResult
fn acosh(&self) -> ExprResult
C++ acosh.
Sourcefn asinh(&self) -> ExprResult
fn asinh(&self) -> ExprResult
C++ asinh.
Sourcefn atanh(&self) -> ExprResult
fn atanh(&self) -> ExprResult
C++ atanh.
Sourcefn if_then_else(&self, t: impl IntoExpr, f: impl IntoExpr) -> ExprResult
fn if_then_else(&self, t: impl IntoExpr, f: impl IntoExpr) -> ExprResult
C++ if_then_else(self, t, f) (if_then_else), with self the condition.
Sourcefn select(&self, t: impl IntoExpr, f: impl IntoExpr) -> ExprResult
fn select(&self, t: impl IntoExpr, f: impl IntoExpr) -> ExprResult
The raw Select(self, t, f) (Select::new), with self the condition.
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.