pub enum Sign {
Negative,
Zero,
Positive,
}
Expand description
Number sign.
Variants§
Implementations§
Source§impl Sign
impl Sign
Sourcepub fn is_non_positive(&self) -> bool
pub fn is_non_positive(&self) -> bool
Checks if the number is non positive (negative or zero).
Sourcepub fn is_non_negative(&self) -> bool
pub fn is_non_negative(&self) -> bool
Checks if the number is non negative (positive or zero).
Sourcepub fn is_positive(&self) -> bool
pub fn is_positive(&self) -> bool
Checks if the number is strictly positive (non zero nor negative).
Sourcepub fn is_negative(&self) -> bool
pub fn is_negative(&self) -> bool
Checks if the number is strictly negative (non zero nor positive).
Trait Implementations§
Source§impl Ord for Sign
impl Ord for Sign
Source§impl PartialOrd for Sign
impl PartialOrd for Sign
impl Copy for Sign
impl Eq for Sign
impl StructuralPartialEq for Sign
Auto Trait Implementations§
impl Freeze for Sign
impl RefUnwindSafe for Sign
impl Send for Sign
impl Sync for Sign
impl Unpin for Sign
impl UnwindSafe for Sign
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more