#[repr(transparent)]pub struct NumRepr<U: Uint>(pub U);
Tuple Fields
0: U
Implementations
sourceimpl<U: Uint> NumRepr<U>
impl<U: Uint> NumRepr<U>
pub const ONE: Self
pub const ZERO: Self
pub const MAX: Self
pub fn new(n: U) -> Self
pub fn is_zero(self) -> bool
pub fn is_even(&self) -> bool
pub fn is_odd(&self) -> bool
pub fn into_inner(self) -> U::Inner
pub fn as_inner(&self) -> &U::Inner
pub fn as_inner_mut(&mut self) -> &mut U::Inner
Trait Implementations
sourceimpl<'macro_lifetime_a, 'macro_lifetime_b, U: Uint> Add<&'macro_lifetime_a NumRepr<U>> for &'macro_lifetime_b NumRepr<U>
impl<'macro_lifetime_a, 'macro_lifetime_b, U: Uint> Add<&'macro_lifetime_a NumRepr<U>> for &'macro_lifetime_b NumRepr<U>
sourceimpl<'macro_lifetime, U: Uint> AddAssign<&'macro_lifetime NumRepr<U>> for NumRepr<U>
impl<'macro_lifetime, U: Uint> AddAssign<&'macro_lifetime NumRepr<U>> for NumRepr<U>
sourcefn add_assign(&mut self, other: &'macro_lifetime NumRepr<U>)
fn add_assign(&mut self, other: &'macro_lifetime NumRepr<U>)
Performs the +=
operation. Read more
sourceimpl<U: Uint> AddAssign<NumRepr<U>> for NumRepr<U>
impl<U: Uint> AddAssign<NumRepr<U>> for NumRepr<U>
sourcefn add_assign(&mut self, other: NumRepr<U>)
fn add_assign(&mut self, other: NumRepr<U>)
Performs the +=
operation. Read more
sourceimpl<'macro_lifetime_a, 'macro_lifetime_b, U: Uint> BitAnd<&'macro_lifetime_a NumRepr<U>> for &'macro_lifetime_b NumRepr<U>
impl<'macro_lifetime_a, 'macro_lifetime_b, U: Uint> BitAnd<&'macro_lifetime_a NumRepr<U>> for &'macro_lifetime_b NumRepr<U>
sourceimpl<'macro_lifetime, U: Uint> BitAndAssign<&'macro_lifetime NumRepr<U>> for NumRepr<U>
impl<'macro_lifetime, U: Uint> BitAndAssign<&'macro_lifetime NumRepr<U>> for NumRepr<U>
sourcefn bitand_assign(&mut self, other: &'macro_lifetime NumRepr<U>)
fn bitand_assign(&mut self, other: &'macro_lifetime NumRepr<U>)
Performs the &=
operation. Read more
sourceimpl<U: Uint> BitAndAssign<NumRepr<U>> for NumRepr<U>
impl<U: Uint> BitAndAssign<NumRepr<U>> for NumRepr<U>
sourcefn bitand_assign(&mut self, other: NumRepr<U>)
fn bitand_assign(&mut self, other: NumRepr<U>)
Performs the &=
operation. Read more
sourceimpl<I: Uint> BitIterBE for NumRepr<I>
impl<I: Uint> BitIterBE for NumRepr<I>
type Iter = BitIteratorBE<I>
fn bit_iter_be(&self) -> Self::Iter
sourceimpl<I: Uint> BitIterLE for NumRepr<I>
impl<I: Uint> BitIterLE for NumRepr<I>
type Iter = BitIteratorLE<I>
fn bit_iter_le(&self) -> Self::Iter
sourceimpl<'macro_lifetime_a, 'macro_lifetime_b, U: Uint> BitOr<&'macro_lifetime_a NumRepr<U>> for &'macro_lifetime_b NumRepr<U>
impl<'macro_lifetime_a, 'macro_lifetime_b, U: Uint> BitOr<&'macro_lifetime_a NumRepr<U>> for &'macro_lifetime_b NumRepr<U>
sourceimpl<'macro_lifetime, U: Uint> BitOrAssign<&'macro_lifetime NumRepr<U>> for NumRepr<U>
impl<'macro_lifetime, U: Uint> BitOrAssign<&'macro_lifetime NumRepr<U>> for NumRepr<U>
sourcefn bitor_assign(&mut self, other: &'macro_lifetime NumRepr<U>)
fn bitor_assign(&mut self, other: &'macro_lifetime NumRepr<U>)
Performs the |=
operation. Read more
sourceimpl<U: Uint> BitOrAssign<NumRepr<U>> for NumRepr<U>
impl<U: Uint> BitOrAssign<NumRepr<U>> for NumRepr<U>
sourcefn bitor_assign(&mut self, other: NumRepr<U>)
fn bitor_assign(&mut self, other: NumRepr<U>)
Performs the |=
operation. Read more
sourceimpl<'macro_lifetime_a, 'macro_lifetime_b, U: Uint> BitXor<&'macro_lifetime_a NumRepr<U>> for &'macro_lifetime_b NumRepr<U>
impl<'macro_lifetime_a, 'macro_lifetime_b, U: Uint> BitXor<&'macro_lifetime_a NumRepr<U>> for &'macro_lifetime_b NumRepr<U>
sourceimpl<'macro_lifetime, U: Uint> BitXorAssign<&'macro_lifetime NumRepr<U>> for NumRepr<U>
impl<'macro_lifetime, U: Uint> BitXorAssign<&'macro_lifetime NumRepr<U>> for NumRepr<U>
sourcefn bitxor_assign(&mut self, other: &'macro_lifetime NumRepr<U>)
fn bitxor_assign(&mut self, other: &'macro_lifetime NumRepr<U>)
Performs the ^=
operation. Read more
sourceimpl<U: Uint> BitXorAssign<NumRepr<U>> for NumRepr<U>
impl<U: Uint> BitXorAssign<NumRepr<U>> for NumRepr<U>
sourcefn bitxor_assign(&mut self, other: NumRepr<U>)
fn bitxor_assign(&mut self, other: NumRepr<U>)
Performs the ^=
operation. Read more
sourceimpl<U: Uint> BorshDeserialize for NumRepr<U>
impl<U: Uint> BorshDeserialize for NumRepr<U>
sourceimpl<U: Uint> BorshSerialize for NumRepr<U>
impl<U: Uint> BorshSerialize for NumRepr<U>
sourceimpl<'de, U: Uint> Deserialize<'de> for NumRepr<U>
impl<'de, U: Uint> Deserialize<'de> for NumRepr<U>
sourcefn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
sourceimpl<'macro_lifetime_a, 'macro_lifetime_b, U: Uint> Div<&'macro_lifetime_a NumRepr<U>> for &'macro_lifetime_b NumRepr<U>
impl<'macro_lifetime_a, 'macro_lifetime_b, U: Uint> Div<&'macro_lifetime_a NumRepr<U>> for &'macro_lifetime_b NumRepr<U>
sourceimpl<'macro_lifetime, U: Uint> DivAssign<&'macro_lifetime NumRepr<U>> for NumRepr<U>
impl<'macro_lifetime, U: Uint> DivAssign<&'macro_lifetime NumRepr<U>> for NumRepr<U>
sourcefn div_assign(&mut self, other: &'macro_lifetime NumRepr<U>)
fn div_assign(&mut self, other: &'macro_lifetime NumRepr<U>)
Performs the /=
operation. Read more
sourceimpl<U: Uint> DivAssign<NumRepr<U>> for NumRepr<U>
impl<U: Uint> DivAssign<NumRepr<U>> for NumRepr<U>
sourcefn div_assign(&mut self, other: NumRepr<U>)
fn div_assign(&mut self, other: NumRepr<U>)
Performs the /=
operation. Read more
sourceimpl<'macro_lifetime_a, 'macro_lifetime_b, U: Uint> Mul<&'macro_lifetime_a NumRepr<U>> for &'macro_lifetime_b NumRepr<U>
impl<'macro_lifetime_a, 'macro_lifetime_b, U: Uint> Mul<&'macro_lifetime_a NumRepr<U>> for &'macro_lifetime_b NumRepr<U>
sourceimpl<'macro_lifetime_a, 'macro_lifetime_b, U: Uint> Mul<&'macro_lifetime_a u64> for &'macro_lifetime_b NumRepr<U>
impl<'macro_lifetime_a, 'macro_lifetime_b, U: Uint> Mul<&'macro_lifetime_a u64> for &'macro_lifetime_b NumRepr<U>
sourceimpl<'macro_lifetime, U: Uint> MulAssign<&'macro_lifetime NumRepr<U>> for NumRepr<U>
impl<'macro_lifetime, U: Uint> MulAssign<&'macro_lifetime NumRepr<U>> for NumRepr<U>
sourcefn mul_assign(&mut self, other: &'macro_lifetime NumRepr<U>)
fn mul_assign(&mut self, other: &'macro_lifetime NumRepr<U>)
Performs the *=
operation. Read more
sourceimpl<'macro_lifetime, U: Uint> MulAssign<&'macro_lifetime u64> for NumRepr<U>
impl<'macro_lifetime, U: Uint> MulAssign<&'macro_lifetime u64> for NumRepr<U>
sourcefn mul_assign(&mut self, other: &'macro_lifetime u64)
fn mul_assign(&mut self, other: &'macro_lifetime u64)
Performs the *=
operation. Read more
sourceimpl<U: Uint> MulAssign<NumRepr<U>> for NumRepr<U>
impl<U: Uint> MulAssign<NumRepr<U>> for NumRepr<U>
sourcefn mul_assign(&mut self, other: NumRepr<U>)
fn mul_assign(&mut self, other: NumRepr<U>)
Performs the *=
operation. Read more
sourceimpl<U: Uint> MulAssign<u64> for NumRepr<U>
impl<U: Uint> MulAssign<u64> for NumRepr<U>
sourcefn mul_assign(&mut self, other: u64)
fn mul_assign(&mut self, other: u64)
Performs the *=
operation. Read more
sourceimpl<U: Uint> Ord for NumRepr<U>
impl<U: Uint> Ord for NumRepr<U>
sourceimpl<U: Uint> PartialOrd<NumRepr<U>> for NumRepr<U>
impl<U: Uint> PartialOrd<NumRepr<U>> for NumRepr<U>
sourcefn partial_cmp(&self, other: &Self) -> Option<Ordering>
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn 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 more
sourceimpl<'macro_lifetime_a, 'macro_lifetime_b, U: Uint> Rem<&'macro_lifetime_a NumRepr<U>> for &'macro_lifetime_b NumRepr<U>
impl<'macro_lifetime_a, 'macro_lifetime_b, U: Uint> Rem<&'macro_lifetime_a NumRepr<U>> for &'macro_lifetime_b NumRepr<U>
sourceimpl<'macro_lifetime, U: Uint> RemAssign<&'macro_lifetime NumRepr<U>> for NumRepr<U>
impl<'macro_lifetime, U: Uint> RemAssign<&'macro_lifetime NumRepr<U>> for NumRepr<U>
sourcefn rem_assign(&mut self, other: &'macro_lifetime NumRepr<U>)
fn rem_assign(&mut self, other: &'macro_lifetime NumRepr<U>)
Performs the %=
operation. Read more
sourceimpl<U: Uint> RemAssign<NumRepr<U>> for NumRepr<U>
impl<U: Uint> RemAssign<NumRepr<U>> for NumRepr<U>
sourcefn rem_assign(&mut self, other: NumRepr<U>)
fn rem_assign(&mut self, other: NumRepr<U>)
Performs the %=
operation. Read more
sourceimpl<'macro_lifetime_a, 'macro_lifetime_b, U: Uint> Shl<&'macro_lifetime_a u32> for &'macro_lifetime_b NumRepr<U>
impl<'macro_lifetime_a, 'macro_lifetime_b, U: Uint> Shl<&'macro_lifetime_a u32> for &'macro_lifetime_b NumRepr<U>
sourceimpl<'macro_lifetime, U: Uint> ShlAssign<&'macro_lifetime u32> for NumRepr<U>
impl<'macro_lifetime, U: Uint> ShlAssign<&'macro_lifetime u32> for NumRepr<U>
sourcefn shl_assign(&mut self, other: &'macro_lifetime u32)
fn shl_assign(&mut self, other: &'macro_lifetime u32)
Performs the <<=
operation. Read more
sourceimpl<U: Uint> ShlAssign<u32> for NumRepr<U>
impl<U: Uint> ShlAssign<u32> for NumRepr<U>
sourcefn shl_assign(&mut self, other: u32)
fn shl_assign(&mut self, other: u32)
Performs the <<=
operation. Read more
sourceimpl<'macro_lifetime_a, 'macro_lifetime_b, U: Uint> Shr<&'macro_lifetime_a u32> for &'macro_lifetime_b NumRepr<U>
impl<'macro_lifetime_a, 'macro_lifetime_b, U: Uint> Shr<&'macro_lifetime_a u32> for &'macro_lifetime_b NumRepr<U>
sourceimpl<'macro_lifetime, U: Uint> ShrAssign<&'macro_lifetime u32> for NumRepr<U>
impl<'macro_lifetime, U: Uint> ShrAssign<&'macro_lifetime u32> for NumRepr<U>
sourcefn shr_assign(&mut self, other: &'macro_lifetime u32)
fn shr_assign(&mut self, other: &'macro_lifetime u32)
Performs the >>=
operation. Read more
sourceimpl<U: Uint> ShrAssign<u32> for NumRepr<U>
impl<U: Uint> ShrAssign<u32> for NumRepr<U>
sourcefn shr_assign(&mut self, other: u32)
fn shr_assign(&mut self, other: u32)
Performs the >>=
operation. Read more
sourceimpl<'macro_lifetime_a, 'macro_lifetime_b, U: Uint> Sub<&'macro_lifetime_a NumRepr<U>> for &'macro_lifetime_b NumRepr<U>
impl<'macro_lifetime_a, 'macro_lifetime_b, U: Uint> Sub<&'macro_lifetime_a NumRepr<U>> for &'macro_lifetime_b NumRepr<U>
sourceimpl<'macro_lifetime, U: Uint> SubAssign<&'macro_lifetime NumRepr<U>> for NumRepr<U>
impl<'macro_lifetime, U: Uint> SubAssign<&'macro_lifetime NumRepr<U>> for NumRepr<U>
sourcefn sub_assign(&mut self, other: &'macro_lifetime NumRepr<U>)
fn sub_assign(&mut self, other: &'macro_lifetime NumRepr<U>)
Performs the -=
operation. Read more
sourceimpl<U: Uint> SubAssign<NumRepr<U>> for NumRepr<U>
impl<U: Uint> SubAssign<NumRepr<U>> for NumRepr<U>
sourcefn sub_assign(&mut self, other: NumRepr<U>)
fn sub_assign(&mut self, other: NumRepr<U>)
Performs the -=
operation. Read more
impl<U: Copy + Uint> Copy for NumRepr<U>
impl<U: Uint> Eq for NumRepr<U>
Auto Trait Implementations
impl<U> RefUnwindSafe for NumRepr<U> where
U: RefUnwindSafe,
impl<U> Send for NumRepr<U> where
U: Send,
impl<U> Sync for NumRepr<U> where
U: Sync,
impl<U> Unpin for NumRepr<U> where
U: Unpin,
impl<U> UnwindSafe for NumRepr<U> where
U: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Out, S> FromSeed<S> for Out where
S: SeedBoxGen<Out>,
impl<Out, S> FromSeed<S> for Out where
S: SeedBoxGen<Out>,
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more