Trait tinychain::scalar::NumberClass [−]
pub trait NumberClass: Default + Into<NumberType> + Ord + Send + Display { type Instance: NumberInstance; pub fn cast(&self, n: Number) -> Self::Instance; pub fn size(self) -> usize; pub fn one(&self) -> Self::Instance; pub fn zero(&self) -> Self::Instance; }
Defines common properties of numeric types supported by Number
.
Associated Types
type Instance: NumberInstance
Required methods
pub fn cast(&self, n: Number) -> Self::Instance
pub fn size(self) -> usize
pub fn one(&self) -> Self::Instance
pub 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