Enum json_number::Sign
source · 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 PartialEq<Sign> for Sign
impl PartialEq<Sign> for Sign
source§impl PartialOrd<Sign> for Sign
impl PartialOrd<Sign> for Sign
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read more