pub struct Hex<const N: usize>(/* private fields */);Implementations§
Source§impl<const N: usize> Hex<N>
impl<const N: usize> Hex<N>
pub const N: usize = N
pub const ZERO: Self
pub const ONE: Self
pub const MAX: Self
pub const fn new(bytes: [u8; N]) -> Self
pub const fn zero() -> Self
pub const fn one() -> Self
pub const fn max() -> Self
pub fn is_zero(&self) -> bool
pub fn as_usize(&self) -> usize
pub fn as_usize_checked(&self) -> Option<usize>
pub fn as_u128(&self) -> u128
pub fn as_u64(&self) -> u64
pub fn as_u32(&self) -> u32
pub fn as_u16(&self) -> u16
pub fn as_u8(&self) -> u8
Trait Implementations§
impl<const N: usize> Copy for Hex<N>
Source§impl<'de, const N: usize> Deserialize<'de> for Hex<N>
impl<'de, const N: usize> Deserialize<'de> for Hex<N>
Source§fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
impl<const N: usize> Eq for Hex<N>
Source§impl<const N: usize> Ord for Hex<N>
impl<const N: usize> Ord for Hex<N>
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<const N: usize> PartialOrd for Hex<N>
impl<const N: usize> PartialOrd for Hex<N>
impl<const N: usize> StructuralPartialEq for Hex<N>
Auto Trait Implementations§
impl<const N: usize> Freeze for Hex<N>
impl<const N: usize> RefUnwindSafe for Hex<N>
impl<const N: usize> Send for Hex<N>
impl<const N: usize> Sync for Hex<N>
impl<const N: usize> Unpin for Hex<N>
impl<const N: usize> UnsafeUnpin for Hex<N>
impl<const N: usize> UnwindSafe for Hex<N>
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
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
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<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
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.