Trait tc_value::NumberInstance [−][src]
pub trait NumberInstance: Copy + Default + From<Boolean> + Into<Number> + Add<Self, Output = Self> + AddAssign<Self> + Sub<Self, Output = Self> + SubAssign<Self> + Mul<Self, Output = Self> + MulAssign<Self> + Div<Self, Output = Self> + DivAssign<Self> + Product<Self> + Sum<Self> + Debug + Display { type Abs: NumberInstance; type Exp: NumberInstance; type Class: NumberClass; fn class(&self) -> Self::Class; fn into_type(
self,
dtype: Self::Class
) -> <Self::Class as NumberClass>::Instance; fn abs(self) -> Self::Abs; fn pow(self, exp: Self::Exp) -> Self; fn and(self, other: Self) -> Self
where
Boolean: CastFrom<Self>, { ... } fn not(self) -> Self
where
Boolean: CastFrom<Self>, { ... } fn or(self, other: Self) -> Self
where
Boolean: CastFrom<Self>, { ... } fn xor(self, other: Self) -> Self
where
Boolean: CastFrom<Self>, { ... } }
Expand description
Defines common operations on numeric types supported by Number
.
Associated Types
Required methods
Get an impl of NumberClass
describing this number.
Cast this number into the specified NumberClass
.
Provided methods
Return true
if self
and other
are nonzero.
Return true
if self
or other
is nonzero.