Struct chain_crypto::hash::Blake2b256
source · pub struct Blake2b256([u8; 32]);
Expand description
Blake2b 256 bits
Tuple Fields§
§0: [u8; 32]
Implementations§
source§impl Blake2b256
impl Blake2b256
Trait Implementations§
source§impl Arbitrary for Blake2b256
impl Arbitrary for Blake2b256
source§impl Arbitrary for Blake2b256
impl Arbitrary for Blake2b256
§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<Blake2b256>
type Strategy = BoxedStrategy<Blake2b256>
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 AsRef<[u8]> for Blake2b256
impl AsRef<[u8]> for Blake2b256
source§impl Bech32 for Blake2b256
impl Bech32 for Blake2b256
source§const BECH32_HRP: &'static str = "blake2b256"
const BECH32_HRP: &'static str = "blake2b256"
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 Clone for Blake2b256
impl Clone for Blake2b256
source§fn clone(&self) -> Blake2b256
fn clone(&self) -> Blake2b256
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for Blake2b256
impl Debug for Blake2b256
source§impl DigestAlg for Blake2b256
impl DigestAlg for Blake2b256
const HASH_SIZE: usize = 32usize
type DigestData = [u8; 32]
type DigestContext = Blake2b
fn try_from_slice(slice: &[u8]) -> Result<Self::DigestData, Error>
fn new() -> Self::DigestContext
fn append_data(ctx: &mut Self::DigestContext, data: &[u8])
fn finalize(ctx: Self::DigestContext) -> Self::DigestData
source§impl Display for Blake2b256
impl Display for Blake2b256
source§impl<'a> From<&'a Blake2b256> for &'a [u8; 32]
impl<'a> From<&'a Blake2b256> for &'a [u8; 32]
source§fn from(bytes: &'a Blake2b256) -> Self
fn from(bytes: &'a Blake2b256) -> Self
Converts to this type from the input type.
source§impl From<Blake2b256> for [u8; 32]
impl From<Blake2b256> for [u8; 32]
source§fn from(bytes: Blake2b256) -> Self
fn from(bytes: 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<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 FromStr for Blake2b256
impl FromStr for Blake2b256
source§impl Hash for Blake2b256
impl Hash for Blake2b256
source§impl Ord for Blake2b256
impl Ord for Blake2b256
source§fn cmp(&self, other: &Blake2b256) -> Ordering
fn cmp(&self, other: &Blake2b256) -> Ordering
1.21.0 · 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 PartialEq<Blake2b256> for Blake2b256
impl PartialEq<Blake2b256> for Blake2b256
source§fn eq(&self, other: &Blake2b256) -> bool
fn eq(&self, other: &Blake2b256) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<Blake2b256> for Blake2b256
impl PartialOrd<Blake2b256> for Blake2b256
source§fn partial_cmp(&self, other: &Blake2b256) -> Option<Ordering>
fn partial_cmp(&self, other: &Blake2b256) -> Option<Ordering>
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 Copy for Blake2b256
impl Eq for Blake2b256
impl StructuralEq for Blake2b256
impl StructuralPartialEq for Blake2b256
Auto Trait Implementations§
impl RefUnwindSafe for Blake2b256
impl Send for Blake2b256
impl Sync for Blake2b256
impl Unpin for Blake2b256
impl UnwindSafe for Blake2b256
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
)