OrderedNum

Trait OrderedNum 

Source
pub trait OrderedNum:
    PartialEq
    + PartialOrd
    + One
    + Zero {
    // Provided methods
    fn is_positive(&self) -> bool { ... }
    fn is_negative(&self) -> bool { ... }
}
Expand description

The OrderedNum trait defines the behavior of ordered numerical types, providing methods for establishing the sign of a number and other fundamental numerical operations.

Provided Methods§

Source

fn is_positive(&self) -> bool

Source

fn is_negative(&self) -> bool

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<T> OrderedNum for T
where T: PartialEq + PartialOrd + One + Zero,