Struct chain_crypto::digest::DigestOf
source · pub struct DigestOf<H: DigestAlg, T> {
inner: Digest<H>,
marker: PhantomData<T>,
}
Expand description
A typed version of Digest
Fields§
§inner: Digest<H>
§marker: PhantomData<T>
Implementations§
Trait Implementations§
source§impl<H: DigestAlg, T> Arbitrary for DigestOf<H, T>where
Digest<H>: Arbitrary + 'static,
PhantomData<T>: Arbitrary + 'static,
impl<H: DigestAlg, T> Arbitrary for DigestOf<H, T>where Digest<H>: Arbitrary + 'static, PhantomData<T>: Arbitrary + 'static,
§type Parameters = ()
type Parameters = ()
The type of parameters that
arbitrary_with
accepts for configuration
of the generated Strategy
. Parameters must implement Default
.§type Strategy = BoxedStrategy<DigestOf<H, T>>
type Strategy = BoxedStrategy<DigestOf<H, T>>
The type of
Strategy
used to generate values of type Self
.source§fn arbitrary_with(args: <Self as Arbitrary>::Parameters) -> Self::Strategy
fn arbitrary_with(args: <Self as Arbitrary>::Parameters) -> Self::Strategy
source§impl<T> Bech32 for DigestOf<Blake2b256, T>
impl<T> Bech32 for DigestOf<Blake2b256, T>
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, T> From<&'a DigestOf<Blake2b256, T>> for &'a [u8; 32]
impl<'a, T> From<&'a DigestOf<Blake2b256, T>> for &'a [u8; 32]
source§fn from(digest: &'a DigestOf<Blake2b256, T>) -> Self
fn from(digest: &'a DigestOf<Blake2b256, T>) -> Self
Converts to this type from the input type.
source§impl<T> From<Blake2b256> for DigestOf<Blake2b256, T>
impl<T> From<Blake2b256> for DigestOf<Blake2b256, T>
source§fn from(bytes: Blake2b256) -> Self
fn from(bytes: Blake2b256) -> Self
Converts to this type from the input type.
source§impl<T> From<DigestOf<Blake2b256, T>> for [u8; 32]
impl<T> From<DigestOf<Blake2b256, T>> for [u8; 32]
source§fn from(digest: DigestOf<Blake2b256, T>) -> Self
fn from(digest: DigestOf<Blake2b256, T>) -> Self
Converts to this type from the input type.
source§impl<H: DigestAlg, T> Ord for DigestOf<H, T>
impl<H: DigestAlg, T> Ord for DigestOf<H, T>
source§impl<H: DigestAlg, T> PartialEq<DigestOf<H, T>> for DigestOf<H, T>
impl<H: DigestAlg, T> PartialEq<DigestOf<H, T>> for DigestOf<H, T>
source§impl<H: DigestAlg, T> PartialOrd<DigestOf<H, T>> for DigestOf<H, T>
impl<H: DigestAlg, T> PartialOrd<DigestOf<H, T>> for DigestOf<H, T>
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, T> Eq for DigestOf<H, T>
Auto Trait Implementations§
impl<H, T> RefUnwindSafe for DigestOf<H, T>where T: RefUnwindSafe, <H as DigestAlg>::DigestData: RefUnwindSafe,
impl<H, T> Send for DigestOf<H, T>where T: Send,
impl<H, T> Sync for DigestOf<H, T>where T: Sync, <H as DigestAlg>::DigestData: Sync,
impl<H, T> Unpin for DigestOf<H, T>where T: Unpin, <H as DigestAlg>::DigestData: Unpin,
impl<H, T> UnwindSafe for DigestOf<H, T>where T: UnwindSafe, <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
)