pub enum Sign {
Positive = 1,
Zero = 0,
Negative = -1,
}
Expand description
Sign with a zero variant.
Variants§
Trait Implementations§
source§impl From<NonZeroSign> for Sign
impl From<NonZeroSign> for Sign
source§fn from(sign: NonZeroSign) -> Self
fn from(sign: NonZeroSign) -> Self
Converts to this type from the input type.
source§impl From<Sign> for NonZeroSign
impl From<Sign> for NonZeroSign
source§impl MulAssign for Sign
impl MulAssign for Sign
source§fn mul_assign(&mut self, rhs: Self)
fn mul_assign(&mut self, rhs: Self)
Performs the
*=
operation. Read moresource§impl NonZero for Sign
impl NonZero for Sign
source§fn is_not_zero(&self) -> bool
fn is_not_zero(&self) -> bool
Whether the value is not equal to zero. Read more
source§impl PartialEq for Sign
impl PartialEq for Sign
source§impl PartialOrd for Sign
impl PartialOrd 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 moreimpl Copy for Sign
impl Eq for Sign
impl StructuralPartialEq for Sign
Auto Trait Implementations§
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
source§impl<T> NonZeroSigned for T
impl<T> NonZeroSigned for T
source§fn non_zero_signum(&self) -> NonZeroSign
fn non_zero_signum(&self) -> NonZeroSign
Whether the value is positive or negative.
source§fn non_zero_is_positive(&self) -> bool
fn non_zero_is_positive(&self) -> bool
Whether
x > 0
.source§fn non_zero_is_negative(&self) -> bool
fn non_zero_is_negative(&self) -> bool
Whether
x < 0
.