pub struct MoveAuthenticatorDigest(/* private fields */);Expand description
The digest of a MoveAuthenticator.
Implementations§
Source§impl MoveAuthenticatorDigest
impl MoveAuthenticatorDigest
Sourcepub const LENGTH: usize = Digest::LENGTH
pub const LENGTH: usize = Digest::LENGTH
A constant representing the length of the digest in bytes.
Sourcepub const fn new(digest: [u8; 32]) -> Self
pub const fn new(digest: [u8; 32]) -> Self
Generates a new digest from the provided 32 byte array.
Sourcepub fn random_with<R>(rng: R) -> Self
Available on crate feature rand only.
pub fn random_with<R>(rng: R) -> Self
rand only.Generates a new digest from the provided random number generator.
Sourcepub const fn into_digest(self) -> Digest
pub const fn into_digest(self) -> Digest
Returns the underlying Digest.
Sourcepub const fn inner(&self) -> &[u8; 32]
pub const fn inner(&self) -> &[u8; 32]
Returns a reference to the inner array representation of this digest.
Sourcepub const fn into_inner(self) -> [u8; 32]
pub const fn into_inner(self) -> [u8; 32]
Returns the inner array representation of this digest.
Sourcepub fn from_base58<T: AsRef<[u8]>>(base58: T) -> Result<Self, DigestParseError>
pub fn from_base58<T: AsRef<[u8]>>(base58: T) -> Result<Self, DigestParseError>
Decodes a digest from a Base58 encoded string.
Sourcepub fn to_base58(&self) -> String
pub fn to_base58(&self) -> String
Returns a Base58 encoded string representation of this digest.
Sourcepub fn from_bytes(bytes: impl AsRef<[u8]>) -> Result<Self, DigestParseError>
pub fn from_bytes(bytes: impl AsRef<[u8]>) -> Result<Self, DigestParseError>
Generates a digest from bytes.
Sourcepub const fn next_lexicographical(&self) -> Self
pub const fn next_lexicographical(&self) -> Self
Returns the next digest in byte-increasing order.
Sourcepub const fn next_lexicographical_opt(&self) -> Option<Self>
pub const fn next_lexicographical_opt(&self) -> Option<Self>
Returns the next digest in byte-increasing order, or None if the
result would overflow.
Trait Implementations§
Source§impl Arbitrary for MoveAuthenticatorDigest
Available on crate feature proptest only.
impl Arbitrary for MoveAuthenticatorDigest
Available on crate feature
proptest only.Source§type Parameters = ()
type Parameters = ()
The type of parameters that
arbitrary_with accepts for configuration
of the generated Strategy. Parameters must implement Default.Source§type Strategy = BoxedStrategy<MoveAuthenticatorDigest>
type Strategy = BoxedStrategy<MoveAuthenticatorDigest>
The type of
Strategy used to generate values of type Self.Source§fn arbitrary_with(
args_shared: <Self as Arbitrary>::Parameters,
) -> Self::Strategy
fn arbitrary_with( args_shared: <Self as Arbitrary>::Parameters, ) -> Self::Strategy
Source§impl AsRef<[u8]> for MoveAuthenticatorDigest
impl AsRef<[u8]> for MoveAuthenticatorDigest
Source§impl Clone for MoveAuthenticatorDigest
impl Clone for MoveAuthenticatorDigest
Source§fn clone(&self) -> MoveAuthenticatorDigest
fn clone(&self) -> MoveAuthenticatorDigest
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for MoveAuthenticatorDigest
Source§impl Debug for MoveAuthenticatorDigest
impl Debug for MoveAuthenticatorDigest
Source§impl Default for MoveAuthenticatorDigest
impl Default for MoveAuthenticatorDigest
Source§fn default() -> MoveAuthenticatorDigest
fn default() -> MoveAuthenticatorDigest
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for MoveAuthenticatorDigest
Available on crate feature serde only.
impl<'de> Deserialize<'de> for MoveAuthenticatorDigest
Available on crate feature
serde only.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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for MoveAuthenticatorDigest
impl Display for MoveAuthenticatorDigest
impl Eq for MoveAuthenticatorDigest
Source§impl From<Digest> for MoveAuthenticatorDigest
impl From<Digest> for MoveAuthenticatorDigest
Source§impl From<MoveAuthenticatorDigest> for Digest
impl From<MoveAuthenticatorDigest> for Digest
Source§fn from(digest: MoveAuthenticatorDigest) -> Self
fn from(digest: MoveAuthenticatorDigest) -> Self
Converts to this type from the input type.
Source§impl From<MoveAuthenticatorDigest> for [u8; 32]
impl From<MoveAuthenticatorDigest> for [u8; 32]
Source§fn from(digest: MoveAuthenticatorDigest) -> Self
fn from(digest: MoveAuthenticatorDigest) -> Self
Converts to this type from the input type.
Source§impl FromStr for MoveAuthenticatorDigest
impl FromStr for MoveAuthenticatorDigest
Source§impl Hash for MoveAuthenticatorDigest
impl Hash for MoveAuthenticatorDigest
Source§impl LowerHex for MoveAuthenticatorDigest
impl LowerHex for MoveAuthenticatorDigest
Source§impl Ord for MoveAuthenticatorDigest
impl Ord for MoveAuthenticatorDigest
Source§fn cmp(&self, other: &MoveAuthenticatorDigest) -> Ordering
fn cmp(&self, other: &MoveAuthenticatorDigest) -> Ordering
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
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for MoveAuthenticatorDigest
impl PartialEq for MoveAuthenticatorDigest
Source§impl PartialOrd for MoveAuthenticatorDigest
impl PartialOrd for MoveAuthenticatorDigest
Source§impl Serialize for MoveAuthenticatorDigest
Available on crate feature serde only.
impl Serialize for MoveAuthenticatorDigest
Available on crate feature
serde only.impl StructuralPartialEq for MoveAuthenticatorDigest
Auto Trait Implementations§
impl Freeze for MoveAuthenticatorDigest
impl RefUnwindSafe for MoveAuthenticatorDigest
impl Send for MoveAuthenticatorDigest
impl Sync for MoveAuthenticatorDigest
impl Unpin for MoveAuthenticatorDigest
impl UnsafeUnpin for MoveAuthenticatorDigest
impl UnwindSafe for MoveAuthenticatorDigest
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> ToHex for T
impl<T> ToHex for T
Source§fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
Encode the hex strict representing
self into the result. Lower case
letters are used (e.g. f9b4ca)Source§fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
Encode the hex strict representing
self into the result. Upper case
letters are used (e.g. F9B4CA)