pub trait EvalexprNumericTypes:
'static
+ Sized
+ Debug
+ Clone
+ PartialEq {
type Int: EvalexprInt<Self>;
type Float: EvalexprFloat<Self>;
// Required methods
fn int_as_float(int: &Self::Int) -> Self::Float;
fn float_as_int(float: &Self::Float) -> Self::Int;
}Expand description
A trait to parameterise evalexpr with an int type and a float type.
See EvalexprInt and EvalexprFloat for the requirements on the types.
Required Associated Types§
Sourcetype Int: EvalexprInt<Self>
type Int: EvalexprInt<Self>
The integer type.
Sourcetype Float: EvalexprFloat<Self>
type Float: EvalexprFloat<Self>
The float type.
Required Methods§
Sourcefn int_as_float(int: &Self::Int) -> Self::Float
fn int_as_float(int: &Self::Int) -> Self::Float
Convert an integer to a float using the as operator or a similar mechanic.
Sourcefn float_as_int(float: &Self::Float) -> Self::Int
fn float_as_int(float: &Self::Float) -> Self::Int
Convert a float to an integer using the as operator or a similar mechanic.
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.