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 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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
.