#[repr(transparent)]pub struct NumRepr<U: Uint>(pub U);Tuple Fields§
§0: UImplementations§
Source§impl<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§
Source§impl<'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>
Source§impl<'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>
Source§fn add_assign(&mut self, other: &'macro_lifetime NumRepr<U>)
fn add_assign(&mut self, other: &'macro_lifetime NumRepr<U>)
Performs the
+= operation. Read moreSource§impl<U: Uint> AddAssign for NumRepr<U>
impl<U: Uint> AddAssign for NumRepr<U>
Source§fn add_assign(&mut self, other: NumRepr<U>)
fn add_assign(&mut self, other: NumRepr<U>)
Performs the
+= operation. Read moreSource§impl<'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>
Source§impl<'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>
Source§fn bitand_assign(&mut self, other: &'macro_lifetime NumRepr<U>)
fn bitand_assign(&mut self, other: &'macro_lifetime NumRepr<U>)
Performs the
&= operation. Read moreSource§impl<U: Uint> BitAndAssign for NumRepr<U>
impl<U: Uint> BitAndAssign for NumRepr<U>
Source§fn bitand_assign(&mut self, other: NumRepr<U>)
fn bitand_assign(&mut self, other: NumRepr<U>)
Performs the
&= operation. Read moreSource§impl<I: Uint> BitIterBE for NumRepr<I>
impl<I: Uint> BitIterBE for NumRepr<I>
type Iter = BitIteratorBE<I>
fn bit_iter_be(&self) -> Self::Iter
Source§impl<I: Uint> BitIterLE for NumRepr<I>
impl<I: Uint> BitIterLE for NumRepr<I>
type Iter = BitIteratorLE<I>
fn bit_iter_le(&self) -> Self::Iter
Source§impl<'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>
Source§impl<'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>
Source§fn bitor_assign(&mut self, other: &'macro_lifetime NumRepr<U>)
fn bitor_assign(&mut self, other: &'macro_lifetime NumRepr<U>)
Performs the
|= operation. Read moreSource§impl<U: Uint> BitOrAssign for NumRepr<U>
impl<U: Uint> BitOrAssign for NumRepr<U>
Source§fn bitor_assign(&mut self, other: NumRepr<U>)
fn bitor_assign(&mut self, other: NumRepr<U>)
Performs the
|= operation. Read moreSource§impl<'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>
Source§impl<'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>
Source§fn bitxor_assign(&mut self, other: &'macro_lifetime NumRepr<U>)
fn bitxor_assign(&mut self, other: &'macro_lifetime NumRepr<U>)
Performs the
^= operation. Read moreSource§impl<U: Uint> BitXorAssign for NumRepr<U>
impl<U: Uint> BitXorAssign for NumRepr<U>
Source§fn bitxor_assign(&mut self, other: NumRepr<U>)
fn bitxor_assign(&mut self, other: NumRepr<U>)
Performs the
^= operation. Read moreSource§impl<U: Uint> BorshDeserialize for NumRepr<U>
impl<U: Uint> BorshDeserialize for NumRepr<U>
Source§impl<U: Uint> BorshSerialize for NumRepr<U>
impl<U: Uint> BorshSerialize for NumRepr<U>
Source§impl<'de, U: Uint> Deserialize<'de> for NumRepr<U>
impl<'de, U: Uint> Deserialize<'de> for NumRepr<U>
Source§fn 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
Source§impl<'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>
Source§impl<'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>
Source§fn div_assign(&mut self, other: &'macro_lifetime NumRepr<U>)
fn div_assign(&mut self, other: &'macro_lifetime NumRepr<U>)
Performs the
/= operation. Read moreSource§impl<U: Uint> DivAssign for NumRepr<U>
impl<U: Uint> DivAssign for NumRepr<U>
Source§fn div_assign(&mut self, other: NumRepr<U>)
fn div_assign(&mut self, other: NumRepr<U>)
Performs the
/= operation. Read moreSource§impl<'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>
Source§impl<'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>
Source§impl<'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>
Source§fn mul_assign(&mut self, other: &'macro_lifetime NumRepr<U>)
fn mul_assign(&mut self, other: &'macro_lifetime NumRepr<U>)
Performs the
*= operation. Read moreSource§impl<'macro_lifetime, U: Uint> MulAssign<&'macro_lifetime u64> for NumRepr<U>
impl<'macro_lifetime, U: Uint> MulAssign<&'macro_lifetime u64> for NumRepr<U>
Source§fn mul_assign(&mut self, other: &'macro_lifetime u64)
fn mul_assign(&mut self, other: &'macro_lifetime u64)
Performs the
*= operation. Read moreSource§impl<U: Uint> MulAssign<u64> for NumRepr<U>
impl<U: Uint> MulAssign<u64> for NumRepr<U>
Source§fn mul_assign(&mut self, other: u64)
fn mul_assign(&mut self, other: u64)
Performs the
*= operation. Read moreSource§impl<U: Uint> MulAssign for NumRepr<U>
impl<U: Uint> MulAssign for NumRepr<U>
Source§fn mul_assign(&mut self, other: NumRepr<U>)
fn mul_assign(&mut self, other: NumRepr<U>)
Performs the
*= operation. Read moreSource§impl<U: Uint> Ord for NumRepr<U>
impl<U: Uint> Ord for NumRepr<U>
Source§impl<U: Uint> PartialOrd for NumRepr<U>
impl<U: Uint> PartialOrd for NumRepr<U>
Source§impl<'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>
Source§impl<'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>
Source§fn rem_assign(&mut self, other: &'macro_lifetime NumRepr<U>)
fn rem_assign(&mut self, other: &'macro_lifetime NumRepr<U>)
Performs the
%= operation. Read moreSource§impl<U: Uint> RemAssign for NumRepr<U>
impl<U: Uint> RemAssign for NumRepr<U>
Source§fn rem_assign(&mut self, other: NumRepr<U>)
fn rem_assign(&mut self, other: NumRepr<U>)
Performs the
%= operation. Read moreSource§impl<'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>
Source§impl<'macro_lifetime, U: Uint> ShlAssign<&'macro_lifetime u32> for NumRepr<U>
impl<'macro_lifetime, U: Uint> ShlAssign<&'macro_lifetime u32> for NumRepr<U>
Source§fn shl_assign(&mut self, other: &'macro_lifetime u32)
fn shl_assign(&mut self, other: &'macro_lifetime u32)
Performs the
<<= operation. Read moreSource§impl<U: Uint> ShlAssign<u32> for NumRepr<U>
impl<U: Uint> ShlAssign<u32> for NumRepr<U>
Source§fn shl_assign(&mut self, other: u32)
fn shl_assign(&mut self, other: u32)
Performs the
<<= operation. Read moreSource§impl<'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>
Source§impl<'macro_lifetime, U: Uint> ShrAssign<&'macro_lifetime u32> for NumRepr<U>
impl<'macro_lifetime, U: Uint> ShrAssign<&'macro_lifetime u32> for NumRepr<U>
Source§fn shr_assign(&mut self, other: &'macro_lifetime u32)
fn shr_assign(&mut self, other: &'macro_lifetime u32)
Performs the
>>= operation. Read moreSource§impl<U: Uint> ShrAssign<u32> for NumRepr<U>
impl<U: Uint> ShrAssign<u32> for NumRepr<U>
Source§fn shr_assign(&mut self, other: u32)
fn shr_assign(&mut self, other: u32)
Performs the
>>= operation. Read moreSource§impl<'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>
Source§impl<'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>
Source§fn sub_assign(&mut self, other: &'macro_lifetime NumRepr<U>)
fn sub_assign(&mut self, other: &'macro_lifetime NumRepr<U>)
Performs the
-= operation. Read moreSource§impl<U: Uint> SubAssign for NumRepr<U>
impl<U: Uint> SubAssign for NumRepr<U>
Source§fn sub_assign(&mut self, other: NumRepr<U>)
fn sub_assign(&mut self, other: NumRepr<U>)
Performs the
-= operation. Read moreimpl<U: Copy + Uint> Copy for NumRepr<U>
impl<U: Uint> Eq for NumRepr<U>
Auto Trait Implementations§
impl<U> Freeze for NumRepr<U>where
U: Freeze,
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§
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