pub enum NumberSign {
Positive,
Negative,
Zero,
}Expand description
Represents the sign of a number
Variants§
Implementations§
Source§impl NumberSign
impl NumberSign
Sourcepub fn to_i8(&self) -> i8
pub fn to_i8(&self) -> i8
Returns a signed 8-bit number representing the sign
- 0 if the number is zero
- 1 if the number is positive
- -1 if the number is negative
use entity::NumberSign;
assert_eq!(NumberSign::Zero.to_i8(), 0);
assert_eq!(NumberSign::Positive.to_i8(), 1);
assert_eq!(NumberSign::Negative.to_i8(), -1);Trait Implementations§
Source§impl Clone for NumberSign
impl Clone for NumberSign
Source§fn clone(&self) -> NumberSign
fn clone(&self) -> NumberSign
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for NumberSign
impl Debug for NumberSign
Source§impl PartialEq for NumberSign
impl PartialEq for NumberSign
impl Copy for NumberSign
impl Eq for NumberSign
impl StructuralPartialEq for NumberSign
Auto Trait Implementations§
impl Freeze for NumberSign
impl RefUnwindSafe for NumberSign
impl Send for NumberSign
impl Sync for NumberSign
impl Unpin for NumberSign
impl UnwindSafe for NumberSign
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