pub trait Signed: PartialOrd + Zero {
// Required methods
fn positive(&self) -> bool;
fn negative(&self) -> bool;
fn non_negative(&self) -> bool;
fn non_positive(&self) -> bool;
}Expand description
Helpful methods for measuring an element’s order relative to 0
Required Methods§
Sourcefn non_negative(&self) -> bool
fn non_negative(&self) -> bool
If this element is greater than or equal to zero
Sourcefn non_positive(&self) -> bool
fn non_positive(&self) -> bool
If this element is less than or equal to zero
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§
impl<G: PartialOrd + Zero> Signed for G
Auto-implemented using default to allow for specialization if desired