Trait tinychain::scalar::NumberClass [−]
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::Instance; fn zero(&self) -> Self::Instance; }
Expand description
Defines common properties of numeric types supported by Number
.
Associated Types
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
Implementors
impl NumberClass for ComplexType
impl NumberClass for ComplexType
impl NumberClass for FloatType
impl NumberClass for FloatType
impl NumberClass for IntType
impl NumberClass for IntType
impl NumberClass for NumberType
impl NumberClass for NumberType
impl NumberClass for UIntType
impl NumberClass for UIntType