Trait number_general::NumberClass[][src]

pub trait NumberClass: Default + Into<NumberType> + Ord + Send + Display {
    type Instance: NumberInstance;
    fn cast(&self, n: Number) -> Self::Instance;
fn size(self) -> usize;
fn one(&self) -> <Self as NumberClass>::Instance;
fn zero(&self) -> <Self as NumberClass>::Instance; fn is_complex(&self) -> bool { ... }
fn is_real(&self) -> bool { ... } }
Expand description

Defines common properties of numeric types supported by Number.

Associated Types

Required methods

Cast the given Number into an instance of this type.

Return the maximum size of this type of Number, in bits.

Return 1 as an instance of this type.

Return 0 as an instance of this type.

Provided methods

Return true if this is a complex type.

Return false if this is a complex type.

Implementors