#[repr(transparent)]pub struct U(pub [u8; 32]);Tuple Fields§
§0: [u8; 32]Implementations§
Source§impl U
impl U
pub const ZERO: U
pub const MAX: U
pub const ONE: U
pub fn is_true(&self) -> bool
pub const fn is_zero(&self) -> bool
pub fn abs_diff(&self, y: &U) -> U
pub const fn const_addr(self) -> [u8; 20]
pub const fn is_max_const(&self) -> bool
pub fn is_max(&self) -> bool
pub fn is_some(&self) -> bool
pub fn trailing_zeros(&self) -> usize
pub fn as_slice(&self) -> &[u8; 32]
pub const fn from_slice_leftpad(x: &[u8]) -> Option<U>
pub fn as_vec(self) -> Vec<u8> ⓘ
pub fn checked_add_opt(&self, y: &U) -> Option<U>
pub fn checked_add(&self, y: &U) -> U
pub fn checked_mul_opt(&self, y: &U) -> Option<U>
pub fn checked_mul(&self, y: &U) -> U
pub fn checked_sub_opt(&self, y: &U) -> Option<U>
pub fn checked_sub(&self, y: &U) -> U
pub fn checked_div_opt(&self, y: &U) -> Option<U>
pub fn checked_div(&self, y: &U) -> U
pub fn checked_pow(&self, exp: &U) -> Option<U>
pub fn wrapping_add(&self, y: &U) -> U
pub fn wrapping_sub(&self, y: &U) -> U
pub fn wrapping_mul(&self, y: &U) -> U
pub fn wrapping_div(&self, y: &U) -> U
pub fn saturating_add(&self, y: &U) -> U
pub fn saturating_sub(&self, y: &U) -> U
pub fn saturating_mul(&self, y: &U) -> U
pub fn saturating_div(&self, y: &U) -> U
pub fn wrapping_neg(self) -> U
pub fn mul_div(&self, y: &U, z: U) -> Option<(U, bool)>
pub fn mul_div_round_up(&self, y: &U, z: U) -> Option<U>
pub fn widening_mul_div(&self, y: &U, z: U) -> Option<(U, bool)>
pub fn widening_mul_div_round_up(&self, y: &U, z: U) -> Option<U>
pub fn mul_mod(&self, y: &U, z: &U) -> U
pub fn add_mod(&self, y: &U, z: &U) -> U
pub fn checked_rooti(self, x: u32) -> Option<U>
pub fn from_hex(x: &str) -> Option<U>
pub const fn const_from_hex(x: &[u8; 64]) -> Option<U>
Trait Implementations§
Source§impl AddAssign for U
impl AddAssign for U
Source§fn add_assign(&mut self, o: U)
fn add_assign(&mut self, o: U)
Performs the
+= operation. Read moreSource§impl BitOrAssign for U
impl BitOrAssign for U
Source§fn bitor_assign(&mut self, rhs: U)
fn bitor_assign(&mut self, rhs: U)
Performs the
|= operation. Read moreimpl Copy for U
impl Eq for U
Source§impl MulAssign for U
impl MulAssign for U
Source§fn mul_assign(&mut self, rhs: U)
fn mul_assign(&mut self, rhs: U)
Performs the
*= operation. Read moreSource§impl Ord for U
impl Ord for U
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for U
impl PartialOrd for U
Source§impl ShlAssign<usize> for U
impl ShlAssign<usize> for U
Source§fn shl_assign(&mut self, rhs: usize)
fn shl_assign(&mut self, rhs: usize)
Performs the
<<= operation. Read moreSource§impl ShrAssign<usize> for U
impl ShrAssign<usize> for U
Source§fn shr_assign(&mut self, rhs: usize)
fn shr_assign(&mut self, rhs: usize)
Performs the
>>= operation. Read moreimpl StructuralPartialEq for U
Source§impl SubAssign for U
impl SubAssign for U
Source§fn sub_assign(&mut self, o: U)
fn sub_assign(&mut self, o: U)
Performs the
-= operation. Read moreSource§impl ValueParserFactory for U
Available on crate feature std only.
impl ValueParserFactory for U
Available on crate feature
std only.Source§type Parser = UValueParser
type Parser = UValueParser
Generated parser, usually
ValueParser. Read moreSource§fn value_parser() -> <U as ValueParserFactory>::Parser
fn value_parser() -> <U as ValueParserFactory>::Parser
Create the specified
Self::ParserAuto Trait Implementations§
impl Freeze for U
impl RefUnwindSafe for U
impl Send for U
impl Sync for U
impl Unpin for U
impl UnsafeUnpin for U
impl UnwindSafe for U
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