Struct chain_crypto::digest::Digest
source · pub struct Digest<H: DigestAlg>(H::DigestData);
Tuple Fields§
§0: H::DigestData
Implementations§
Trait Implementations§
source§impl<H: DigestAlg> Arbitrary for Digest<H>where
H::DigestData: Arbitrary + 'static,
impl<H: DigestAlg> Arbitrary for Digest<H>where H::DigestData: Arbitrary + 'static,
§type Parameters = ()
type Parameters = ()
The type of parameters that
arbitrary_with
accepts for configuration
of the generated Strategy
. Parameters must implement Default
.source§fn arbitrary_with(args: <Self as Arbitrary>::Parameters) -> Self::Strategy
fn arbitrary_with(args: <Self as Arbitrary>::Parameters) -> Self::Strategy
source§impl Bech32 for Digest<Blake2b256>
impl Bech32 for Digest<Blake2b256>
source§const BECH32_HRP: &'static str = "blake2b"
const BECH32_HRP: &'static str = "blake2b"
The human-readable prefix that is used to represent the
the object in the Bech32 format. On decoding, the HRP of the input
string is checked against this value.
source§fn try_from_bech32_str(bech32_str: &str) -> Result<Self>
fn try_from_bech32_str(bech32_str: &str) -> Result<Self>
Decodes the object from its Bech32 string representation.
source§fn to_bech32_str(&self) -> String
fn to_bech32_str(&self) -> String
Produces a Bech32 string format representation of the object.
source§impl<'a> From<&'a Digest<Blake2b256>> for &'a [u8; 32]
impl<'a> From<&'a Digest<Blake2b256>> for &'a [u8; 32]
source§fn from(digest: &'a Digest<Blake2b256>) -> Self
fn from(digest: &'a Digest<Blake2b256>) -> Self
Converts to this type from the input type.
source§impl From<Blake2b256> for Digest<Blake2b256>
impl From<Blake2b256> for Digest<Blake2b256>
source§fn from(bytes: Blake2b256) -> Self
fn from(bytes: Blake2b256) -> Self
Converts to this type from the input type.
source§impl From<Digest<Blake2b256>> for [u8; 32]
impl From<Digest<Blake2b256>> for [u8; 32]
source§fn from(digest: Digest<Blake2b256>) -> Self
fn from(digest: Digest<Blake2b256>) -> Self
Converts to this type from the input type.
source§impl<H: DigestAlg> Ord for Digest<H>
impl<H: DigestAlg> Ord for Digest<H>
source§impl<H: DigestAlg> PartialEq<Digest<H>> for Digest<H>
impl<H: DigestAlg> PartialEq<Digest<H>> for Digest<H>
source§impl<H: DigestAlg> PartialOrd<Digest<H>> for Digest<H>
impl<H: DigestAlg> PartialOrd<Digest<H>> for Digest<H>
1.0.0 · source§fn 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 moreimpl<H: DigestAlg> Eq for Digest<H>
Auto Trait Implementations§
impl<H> RefUnwindSafe for Digest<H>where <H as DigestAlg>::DigestData: RefUnwindSafe,
impl<H> Send for Digest<H>
impl<H> Sync for Digest<H>where <H as DigestAlg>::DigestData: Sync,
impl<H> Unpin for Digest<H>where <H as DigestAlg>::DigestData: Unpin,
impl<H> UnwindSafe for Digest<H>where <H as DigestAlg>::DigestData: UnwindSafe,
Blanket Implementations§
§impl<T> Base32Len for Twhere
T: AsRef<[u8]>,
impl<T> Base32Len for Twhere T: AsRef<[u8]>,
§fn base32_len(&self) -> usize
fn base32_len(&self) -> usize
Calculate the base32 serialized length
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> ToHex for Twhere
T: AsRef<[u8]>,
impl<T> ToHex for Twhere T: AsRef<[u8]>,
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
)