pub struct Uint9(/* private fields */);Expand description
Fixed-length 9-bit integer.
Implementations§
Source§impl Uint9
impl Uint9
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 saturating_add(self, rhs: Self) -> Self
pub const fn saturating_add(self, rhs: Self) -> Self
Saturating integer addition. Computes self + rhs,
saturating at the numeric bounds instead of overflowing.
Sourcepub const fn saturating_sub(self, rhs: Self) -> Self
pub const fn saturating_sub(self, rhs: Self) -> Self
Saturating integer addition. Computes self - rhs,
saturating at the numeric bounds instead of overflowing.
Sourcepub const fn saturating_mul(self, rhs: Self) -> Self
pub const fn saturating_mul(self, rhs: Self) -> Self
Saturating integer multiplication. Computes self * rhs,
returning None if overflow occurred.
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<u16> for Uint9
impl AddAssign<u16> for Uint9
Source§fn add_assign(&mut self, rhs: u16)
fn add_assign(&mut self, rhs: u16)
+= operation. Read moreSource§impl AddAssign for Uint9
impl AddAssign for Uint9
Source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
+= operation. Read moreSource§impl<'de> Deserialize<'de> for Uint9
impl<'de> Deserialize<'de> for Uint9
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Source§impl DivAssign<u16> for Uint9
impl DivAssign<u16> for Uint9
Source§fn div_assign(&mut self, rhs: u16)
fn div_assign(&mut self, rhs: u16)
/= operation. Read moreSource§impl DivAssign for Uint9
impl DivAssign for Uint9
Source§fn div_assign(&mut self, rhs: Self)
fn div_assign(&mut self, rhs: Self)
/= operation. Read moreSource§impl ExactSize for Uint9
impl ExactSize for Uint9
Source§fn exact_size(&self) -> Size
fn exact_size(&self) -> Size
Source§impl IntoPlainAbi for Uint9
impl IntoPlainAbi for Uint9
Source§fn as_plain_abi(&self) -> PlainAbiValue
fn as_plain_abi(&self) -> PlainAbiValue
Source§fn into_plain_abi(self) -> PlainAbiValuewhere
Self: Sized,
fn into_plain_abi(self) -> PlainAbiValuewhere
Self: Sized,
Source§impl LoadDictKey for Uint9
impl LoadDictKey for Uint9
Source§fn load_from_data(data: &CellDataBuilder) -> Option<Self>
fn load_from_data(data: &CellDataBuilder) -> Option<Self>
Source§impl MulAssign<u16> for Uint9
impl MulAssign<u16> for Uint9
Source§fn mul_assign(&mut self, rhs: u16)
fn mul_assign(&mut self, rhs: u16)
*= operation. Read moreSource§impl MulAssign for Uint9
impl MulAssign for Uint9
Source§fn mul_assign(&mut self, rhs: Self)
fn mul_assign(&mut self, rhs: Self)
*= operation. Read moreSource§impl Ord for Uint9
impl Ord for Uint9
Source§impl PartialOrd for Uint9
impl PartialOrd for Uint9
Source§impl ShlAssign<u8> for Uint9
impl ShlAssign<u8> for Uint9
Source§fn shl_assign(&mut self, rhs: u8)
fn shl_assign(&mut self, rhs: u8)
<<= operation. Read moreSource§impl ShrAssign<u8> for Uint9
impl ShrAssign<u8> for Uint9
Source§fn shr_assign(&mut self, rhs: u8)
fn shr_assign(&mut self, rhs: u8)
>>= operation. Read moreSource§impl Store for Uint9
impl Store for Uint9
Source§fn store_into(
&self,
builder: &mut CellBuilder,
_: &dyn CellContext,
) -> Result<(), Error>
fn store_into( &self, builder: &mut CellBuilder, _: &dyn CellContext, ) -> Result<(), Error>
Source§impl StoreDictKey for Uint9
impl StoreDictKey for Uint9
Source§fn store_into_data(&self, builder: &mut CellDataBuilder) -> Result<(), Error>
fn store_into_data(&self, builder: &mut CellDataBuilder) -> Result<(), Error>
Source§impl SubAssign<u16> for Uint9
impl SubAssign<u16> for Uint9
Source§fn sub_assign(&mut self, rhs: u16)
fn sub_assign(&mut self, rhs: u16)
-= operation. Read moreSource§impl SubAssign for Uint9
impl SubAssign for Uint9
Source§fn sub_assign(&mut self, rhs: Self)
fn sub_assign(&mut self, rhs: Self)
-= operation. Read moreSource§impl WithPlainAbiType for Uint9
impl WithPlainAbiType for Uint9
Source§fn plain_abi_type() -> PlainAbiType
fn plain_abi_type() -> PlainAbiType
impl Copy for Uint9
impl Eq for Uint9
impl StructuralPartialEq for Uint9
Auto Trait Implementations§
impl Freeze for Uint9
impl RefUnwindSafe for Uint9
impl Send for Uint9
impl Sync for Uint9
impl Unpin for Uint9
impl UnwindSafe for Uint9
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
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
self to key and returns true if they are equal.