pub struct DRIPS_PER_STORAGE_COLLATERAL_UNIT { /* private fields */ }Expand description
This is the unit of storage collateral to deposit
Methods from Deref<Target = U256>§
pub const MAX: U256
pub fn as_u64(&self) -> u64
pub fn as_u64(&self) -> u64
Conversion to u64 with overflow checking
§Panics
Panics if the number is larger than u64::max_value().
pub fn as_usize(&self) -> usize
pub fn as_usize(&self) -> usize
Conversion to usize with overflow checking
§Panics
Panics if the number is larger than usize::max_value().
pub fn leading_zeros(&self) -> u32
pub fn leading_zeros(&self) -> u32
Returns the number of leading zeros in the binary representation of self.
pub fn trailing_zeros(&self) -> u32
pub fn trailing_zeros(&self) -> u32
Returns the number of trailing zeros in the binary representation of self.
pub fn byte(&self, index: usize) -> u8
pub fn byte(&self, index: usize) -> u8
Return specific byte. Byte 0 is the least significant value (ie~ little endian).
§Panics
Panics if index exceeds the byte width of the number.
pub fn to_big_endian(&self) -> [u8; 32]
pub fn to_big_endian(&self) -> [u8; 32]
Convert to big-endian bytes.
pub fn write_as_big_endian(&self, bytes: &mut [u8])
pub fn write_as_big_endian(&self, bytes: &mut [u8])
Write to the slice in big-endian format.
pub fn to_little_endian(&self) -> [u8; 32]
pub fn to_little_endian(&self) -> [u8; 32]
Convert to little-endian bytes.
pub fn write_as_little_endian(&self, bytes: &mut [u8])
pub fn integer_sqrt(&self) -> U256
pub fn integer_sqrt(&self) -> U256
Compute the highest n such that n * n <= self.
Trait Implementations§
impl LazyStatic for DRIPS_PER_STORAGE_COLLATERAL_UNIT
Auto Trait Implementations§
impl Freeze for DRIPS_PER_STORAGE_COLLATERAL_UNIT
impl RefUnwindSafe for DRIPS_PER_STORAGE_COLLATERAL_UNIT
impl Send for DRIPS_PER_STORAGE_COLLATERAL_UNIT
impl Sync for DRIPS_PER_STORAGE_COLLATERAL_UNIT
impl Unpin for DRIPS_PER_STORAGE_COLLATERAL_UNIT
impl UnwindSafe for DRIPS_PER_STORAGE_COLLATERAL_UNIT
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