Struct everscale_types::num::VarUint248
source · #[repr(transparent)]pub struct VarUint248(_);Expand description
Variable-length 248-bit integer.
Stored as 5 bits of len (0..=31), followed by len bytes.
Implementations§
source§impl VarUint248
impl VarUint248
sourcepub const fn from_words(hi: u128, lo: u128) -> Self
pub const fn from_words(hi: u128, lo: u128) -> Self
Constructs self from a pair of high and low underlying integers.
sourcepub const fn into_words(self) -> (u128, u128)
pub const fn into_words(self) -> (u128, u128)
Returns a tuple of high and low underlying integers.
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 bit_len(&self) -> Option<u16>
pub const fn bit_len(&self) -> Option<u16>
Returns number of data bits that this struct occupies.
Returns None if an underlying primitive integer is too large.
sourcepub const fn leading_zeros(&self) -> u32
pub const fn leading_zeros(&self) -> u32
Returns the number of leading zeros in the binary representation of self.
Trait Implementations§
source§impl Clone for VarUint248
impl Clone for VarUint248
source§fn clone(&self) -> VarUint248
fn clone(&self) -> VarUint248
Returns a copy 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 VarUint248
impl Debug for VarUint248
source§impl Default for VarUint248
impl Default for VarUint248
source§fn default() -> VarUint248
fn default() -> VarUint248
Returns the “default value” for a type. Read more
source§impl<'a> Load<'a> for VarUint248
impl<'a> Load<'a> for VarUint248
source§impl Ord for VarUint248
impl Ord for VarUint248
source§impl PartialEq<VarUint248> for VarUint248
impl PartialEq<VarUint248> for VarUint248
source§fn eq(&self, other: &VarUint248) -> bool
fn eq(&self, other: &VarUint248) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl PartialOrd<VarUint248> for VarUint248
impl PartialOrd<VarUint248> for VarUint248
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 Store for VarUint248
impl Store for VarUint248
source§fn store_into(
&self,
builder: &mut CellBuilder,
_: &mut dyn Finalizer
) -> Result<(), Error>
fn store_into( &self, builder: &mut CellBuilder, _: &mut dyn Finalizer ) -> Result<(), Error>
Tries to store itself into the cell builder.
impl Copy for VarUint248
impl Eq for VarUint248
impl StructuralEq for VarUint248
impl StructuralPartialEq for VarUint248
Auto Trait Implementations§
impl RefUnwindSafe for VarUint248
impl Send for VarUint248
impl Sync for VarUint248
impl Unpin for VarUint248
impl UnwindSafe for VarUint248
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