pub struct Integer { /* private fields */ }
Expand description
Uses internally a i64
.
Implementations§
Source§impl Integer
impl Integer
pub const MAX: Self = _
pub const MIN: Self = _
pub fn from_be_bytes(bytes: [u8; 8]) -> Self
pub fn to_be_bytes(self) -> [u8; 8]
Sourcepub fn checked_add(self, rhs: impl Into<Self>) -> Option<Self>
pub fn checked_add(self, rhs: impl Into<Self>) -> Option<Self>
Returns None
in case of overflow (FOAR0002).
Sourcepub fn checked_sub(self, rhs: impl Into<Self>) -> Option<Self>
pub fn checked_sub(self, rhs: impl Into<Self>) -> Option<Self>
Returns None
in case of overflow (FOAR0002).
Sourcepub fn checked_mul(self, rhs: impl Into<Self>) -> Option<Self>
pub fn checked_mul(self, rhs: impl Into<Self>) -> Option<Self>
Returns None
in case of overflow (FOAR0002).
Sourcepub fn checked_div(self, rhs: impl Into<Self>) -> Option<Self>
pub fn checked_div(self, rhs: impl Into<Self>) -> Option<Self>
Sourcepub fn checked_rem(self, rhs: impl Into<Self>) -> Option<Self>
pub fn checked_rem(self, rhs: impl Into<Self>) -> Option<Self>
Sourcepub fn checked_rem_euclid(self, rhs: impl Into<Self>) -> Option<Self>
pub fn checked_rem_euclid(self, rhs: impl Into<Self>) -> Option<Self>
Sourcepub fn checked_neg(self) -> Option<Self>
pub fn checked_neg(self) -> Option<Self>
Returns None
in case of overflow (FOAR0002).
Sourcepub fn checked_abs(self) -> Option<Self>
pub fn checked_abs(self) -> Option<Self>
pub const fn is_negative(self) -> bool
pub const fn is_positive(self) -> bool
Sourcepub fn is_identical_with(self, other: Self) -> bool
pub fn is_identical_with(self, other: Self) -> bool
Checks if the two values are identical.
Trait Implementations§
Source§impl Ord for Integer
impl Ord for Integer
Source§impl PartialOrd for Integer
impl PartialOrd for Integer
impl Copy for Integer
impl Eq for Integer
impl StructuralPartialEq for Integer
Auto Trait Implementations§
impl Freeze for Integer
impl RefUnwindSafe for Integer
impl Send for Integer
impl Sync for Integer
impl Unpin for Integer
impl UnwindSafe for Integer
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