pub enum Sign {
Positive = 1,
Zero = 0,
Negative = -1,
}Expand description
Sign with a zero variant.
Variants§
Trait Implementations§
impl Copy for Sign
impl Eq for Sign
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 Negateable for Sign
impl Negateable for Sign
Source§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 NonZeroSigned for Sign
impl NonZeroSigned for Sign
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.Source§impl Ord for Sign
Signs are totally ordered as Negative < Zero < Positive, matching the discriminants.
impl Ord for Sign
Signs are totally ordered as Negative < Zero < Positive, matching the discriminants.
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for Sign
impl PartialOrd 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 UnsafeUnpin 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