#[repr(i8)]pub(crate) enum Sign {
Zero = 0,
Positive = 1,
Negative = -1,
}Expand description
A representation of a numeric sign.
Its Display impl emits the ASCII minus sign, - when this
is negative. It emits the empty string in all other cases.
Variants§
Implementations§
Source§impl Sign
impl Sign
pub(crate) fn is_negative(&self) -> bool
pub(crate) fn as_ranged_integer(&self) -> ri8<-1, 1>
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