Trait tc_value::NumberClass
source · pub trait NumberClass: Default + Into<NumberType> + Ord + Send + Display {
type Instance: NumberInstance;
// Required methods
fn cast(&self, n: Number) -> Self::Instance;
fn size(self) -> usize;
fn one(&self) -> Self::Instance;
fn zero(&self) -> Self::Instance;
// Provided methods
fn is_complex(&self) -> bool { ... }
fn is_real(&self) -> bool { ... }
}
Expand description
Defines common properties of numeric types supported by Number
.
Required Associated Types§
type Instance: NumberInstance
Required Methods§
Provided Methods§
sourcefn is_complex(&self) -> bool
fn is_complex(&self) -> bool
Return true
if this is a complex type.
Object Safety§
This trait is not object safe.