Struct everscale_types::num::Uint12
source · #[repr(transparent)]pub struct Uint12(_);Expand description
Fixed-length 12-bit integer.
Implementations§
source§impl Uint12
impl Uint12
sourcepub const fn into_inner(self) -> u16
pub const fn into_inner(self) -> u16
Converts integer into an underlying primitive integer.
sourcepub const fn is_valid(&self) -> bool
pub const fn is_valid(&self) -> bool
Returns true if an underlying primitive integer fits into the repr.
sourcepub const fn checked_add(self, rhs: Self) -> Option<Self>
pub const fn checked_add(self, rhs: Self) -> Option<Self>
Checked integer addition. Computes self + rhs, returning None if overflow occurred.
sourcepub const fn checked_sub(self, rhs: Self) -> Option<Self>
pub const fn checked_sub(self, rhs: Self) -> Option<Self>
Checked integer subtraction. Computes self - rhs, returning None if overflow occurred.
sourcepub const fn checked_mul(self, rhs: Self) -> Option<Self>
pub const fn checked_mul(self, rhs: Self) -> Option<Self>
Checked integer multiplication. Computes self * rhs, returning None if overflow occurred.
sourcepub const fn checked_div(self, rhs: Self) -> Option<Self>
pub const fn checked_div(self, rhs: Self) -> Option<Self>
Checked integer division. Computes self / rhs, returning None if rhs == 0
or overflow occurred.
Trait Implementations§
source§impl AddAssign<Uint12> for Uint12
impl AddAssign<Uint12> for Uint12
source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Performs the
+= operation. Read moresource§impl AddAssign<u16> for Uint12
impl AddAssign<u16> for Uint12
source§fn add_assign(&mut self, rhs: u16)
fn add_assign(&mut self, rhs: u16)
Performs the
+= operation. Read moresource§impl DivAssign<Uint12> for Uint12
impl DivAssign<Uint12> for Uint12
source§fn div_assign(&mut self, rhs: Self)
fn div_assign(&mut self, rhs: Self)
Performs the
/= operation. Read moresource§impl DivAssign<u16> for Uint12
impl DivAssign<u16> for Uint12
source§fn div_assign(&mut self, rhs: u16)
fn div_assign(&mut self, rhs: u16)
Performs the
/= operation. Read moresource§impl<'a, C: CellFamily> Load<'a, C> for Uint12
impl<'a, C: CellFamily> Load<'a, C> for Uint12
source§impl MulAssign<Uint12> for Uint12
impl MulAssign<Uint12> for Uint12
source§fn mul_assign(&mut self, rhs: Self)
fn mul_assign(&mut self, rhs: Self)
Performs the
*= operation. Read moresource§impl MulAssign<u16> for Uint12
impl MulAssign<u16> for Uint12
source§fn mul_assign(&mut self, rhs: u16)
fn mul_assign(&mut self, rhs: u16)
Performs the
*= operation. Read moresource§impl Ord for Uint12
impl Ord for Uint12
source§impl PartialEq<Uint12> for Uint12
impl PartialEq<Uint12> for Uint12
source§impl PartialEq<Uint12> for u16
impl PartialEq<Uint12> for u16
source§impl PartialOrd<Uint12> for Uint12
impl PartialOrd<Uint12> for Uint12
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moresource§impl ShlAssign<u8> for Uint12
impl ShlAssign<u8> for Uint12
source§fn shl_assign(&mut self, rhs: u8)
fn shl_assign(&mut self, rhs: u8)
Performs the
<<= operation. Read moresource§impl ShrAssign<u8> for Uint12
impl ShrAssign<u8> for Uint12
source§fn shr_assign(&mut self, rhs: u8)
fn shr_assign(&mut self, rhs: u8)
Performs the
>>= operation. Read moresource§impl<C: CellFamily> Store<C> for Uint12
impl<C: CellFamily> Store<C> for Uint12
source§fn store_into(
&self,
builder: &mut CellBuilder<C>,
_: &mut dyn Finalizer<C>
) -> bool
fn store_into( &self, builder: &mut CellBuilder<C>, _: &mut dyn Finalizer<C> ) -> bool
Tries to store itself into the cell builder.
source§impl SubAssign<Uint12> for Uint12
impl SubAssign<Uint12> for Uint12
source§fn sub_assign(&mut self, rhs: Self)
fn sub_assign(&mut self, rhs: Self)
Performs the
-= operation. Read moresource§impl SubAssign<u16> for Uint12
impl SubAssign<u16> for Uint12
source§fn sub_assign(&mut self, rhs: u16)
fn sub_assign(&mut self, rhs: u16)
Performs the
-= operation. Read more