pub struct Integer { /* private fields */ }
Expand description
Uses internally a i64
.
Implementations§
Source§impl Integer
impl Integer
pub const MAX: Integer
pub const MIN: Integer
pub fn from_be_bytes(bytes: [u8; 8]) -> Integer
pub fn to_be_bytes(self) -> [u8; 8]
Sourcepub fn checked_add(self, rhs: impl Into<Integer>) -> Result<Integer, ThinError>
pub fn checked_add(self, rhs: impl Into<Integer>) -> Result<Integer, ThinError>
Returns Err
in case of overflow (FOAR0002).
Sourcepub fn checked_sub(self, rhs: impl Into<Integer>) -> Result<Integer, ThinError>
pub fn checked_sub(self, rhs: impl Into<Integer>) -> Result<Integer, ThinError>
Returns Err
in case of overflow (FOAR0002).
Sourcepub fn checked_mul(self, rhs: impl Into<Integer>) -> Result<Integer, ThinError>
pub fn checked_mul(self, rhs: impl Into<Integer>) -> Result<Integer, ThinError>
Returns Err
in case of overflow (FOAR0002).
Sourcepub fn checked_div(self, rhs: impl Into<Integer>) -> Result<Integer, ThinError>
pub fn checked_div(self, rhs: impl Into<Integer>) -> Result<Integer, ThinError>
Sourcepub fn checked_rem(self, rhs: impl Into<Integer>) -> Result<Integer, ThinError>
pub fn checked_rem(self, rhs: impl Into<Integer>) -> Result<Integer, ThinError>
Sourcepub fn checked_neg(self) -> Result<Integer, ThinError>
pub fn checked_neg(self) -> Result<Integer, ThinError>
Returns Err
in case of overflow (FOAR0002).
Sourcepub fn checked_abs(self) -> Result<Integer, ThinError>
pub fn checked_abs(self) -> Result<Integer, ThinError>
pub const fn is_negative(self) -> bool
pub const fn is_positive(self) -> bool
Sourcepub fn is_identical_with(self, other: Integer) -> bool
pub fn is_identical_with(self, other: Integer) -> bool
Checks if the two values are identical.
pub fn as_i64(self) -> i64
Trait Implementations§
Source§impl Ord for Integer
impl Ord for Integer
Source§impl PartialOrd for Integer
impl PartialOrd for Integer
Source§impl TryFrom<TypedValueRef<'_>> for Integer
impl TryFrom<TypedValueRef<'_>> 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more