Struct handshakes::hashes::Blake2b256Digest
source · [−]pub struct Blake2b256Digest(_);
Expand description
An unmarked Blake2b256 digest output
Implementations
sourceimpl Blake2b256Digest
impl Blake2b256Digest
sourcepub fn to_internal(self) -> DigestOutput<Blake2b256>
pub fn to_internal(self) -> DigestOutput<Blake2b256>
Unwrap the marked digest, returning the underlying GenericArray
Trait Implementations
sourceimpl AsMut<[u8]> for Blake2b256Digest
impl AsMut<[u8]> for Blake2b256Digest
sourceimpl AsMut<GenericArray<u8, <Blake2b256 as OutputSizeUser>::OutputSize>> for Blake2b256Digest
impl AsMut<GenericArray<u8, <Blake2b256 as OutputSizeUser>::OutputSize>> for Blake2b256Digest
sourcefn as_mut(&mut self) -> &mut DigestOutput<Blake2b256>
fn as_mut(&mut self) -> &mut DigestOutput<Blake2b256>
Converts this type into a mutable reference of the (usually inferred) input type.
sourceimpl AsRef<[u8]> for Blake2b256Digest
impl AsRef<[u8]> for Blake2b256Digest
sourceimpl AsRef<GenericArray<u8, <Blake2b256 as OutputSizeUser>::OutputSize>> for Blake2b256Digest
impl AsRef<GenericArray<u8, <Blake2b256 as OutputSizeUser>::OutputSize>> for Blake2b256Digest
sourcefn as_ref(&self) -> &DigestOutput<Blake2b256>
fn as_ref(&self) -> &DigestOutput<Blake2b256>
Converts this type into a shared reference of the (usually inferred) input type.
sourceimpl ByteFormat for Blake2b256Digest
impl ByteFormat for Blake2b256Digest
sourcefn serialized_length(&self) -> usize
fn serialized_length(&self) -> usize
Returns the byte-length of the serialized data structure.
sourcefn read_from<R>(reader: &mut R) -> SerResult<Self> where
R: Read,
Self: Sized,
fn read_from<R>(reader: &mut R) -> SerResult<Self> where
R: Read,
Self: Sized,
Deserializes an instance of Self
from a std::io::Read
.
The limit
argument is used only when deserializing collections, and specifies a maximum
number of instances of the underlying type to read. Read more
sourcefn write_to<W>(&self, writer: &mut W) -> SerResult<usize> where
W: Write,
fn write_to<W>(&self, writer: &mut W) -> SerResult<usize> where
W: Write,
Serializes self
to a std::io::Write
. Following Write
trait conventions, its Ok
type must be a usize
denoting the number of bytes written. Read more
sourcefn read_seq_from<R>(
reader: &mut R,
mode: ReadSeqMode
) -> Result<Vec<Self, Global>, Self::Error> where
R: Read,
fn read_seq_from<R>(
reader: &mut R,
mode: ReadSeqMode
) -> Result<Vec<Self, Global>, Self::Error> where
R: Read,
Read a sequence of exactly limit
objects from the reader.
sourcefn write_seq_to<'a, W, E, Iter, Item>(
writer: &mut W,
iter: Iter
) -> Result<usize, Self::Error> where
W: Write,
E: Into<Self::Error> + From<SerError> + From<Error> + Error,
Item: 'a + ByteFormat<Error = E>,
Iter: IntoIterator<Item = &'a Item>,
fn write_seq_to<'a, W, E, Iter, Item>(
writer: &mut W,
iter: Iter
) -> Result<usize, Self::Error> where
W: Write,
E: Into<Self::Error> + From<SerError> + From<Error> + Error,
Item: 'a + ByteFormat<Error = E>,
Iter: IntoIterator<Item = &'a Item>,
Write a sequence of ByteFormat
objects to a writer. The iter
argument may be any object that implements
IntoIterator<Item = &Item>
. This means we can seamlessly use vectors,
slices, etc. Read more
sourcefn deserialize_hex(s: &str) -> Result<Self, Self::Error>
fn deserialize_hex(s: &str) -> Result<Self, Self::Error>
Decodes a hex string to a Vec<u8>
, deserializes an instance of Self
from that vector.
sourcefn deserialize_base64(s: &str) -> Result<Self, Self::Error>
fn deserialize_base64(s: &str) -> Result<Self, Self::Error>
Serialize self
to a base64 string, using standard RFC4648 non-url safe characters
sourcefn serialize_hex(&self) -> String
fn serialize_hex(&self) -> String
Serializes self
to a vector, returns the hex-encoded vector
sourcefn serialize_base64(&self) -> String
fn serialize_base64(&self) -> String
Serialize self
to a base64 string, using standard RFC4648 non-url safe characters
sourceimpl Clone for Blake2b256Digest
impl Clone for Blake2b256Digest
sourcefn clone(&self) -> Blake2b256Digest
fn clone(&self) -> Blake2b256Digest
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for Blake2b256Digest
impl Debug for Blake2b256Digest
sourceimpl Default for Blake2b256Digest
impl Default for Blake2b256Digest
sourcefn default() -> Blake2b256Digest
fn default() -> Blake2b256Digest
Returns the “default value” for a type. Read more
sourceimpl<'de> Deserialize<'de> for Blake2b256Digest
impl<'de> Deserialize<'de> for Blake2b256Digest
sourcefn deserialize<D>(deserializer: D) -> Result<Blake2b256Digest, D::Error> where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Blake2b256Digest, D::Error> where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl<T> From<T> for Blake2b256Digest where
T: Into<DigestOutput<Blake2b256>>,
impl<T> From<T> for Blake2b256Digest where
T: Into<DigestOutput<Blake2b256>>,
sourceimpl Hash for Blake2b256Digest
impl Hash for Blake2b256Digest
sourceimpl MarkedDigest<Blake2b256Digest> for Blake2b256
impl MarkedDigest<Blake2b256Digest> for Blake2b256
sourcefn finalize_marked(self) -> Blake2b256Digest
fn finalize_marked(self) -> Blake2b256Digest
Produce a marked digest from the hasher
sourcefn digest_marked(data: &[u8]) -> Blake2b256Digest
fn digest_marked(data: &[u8]) -> Blake2b256Digest
Shortcut to produce a marked digest
sourceimpl MarkedDigestOutput for Blake2b256Digest
impl MarkedDigestOutput for Blake2b256Digest
sourceimpl Ord for Blake2b256Digest
impl Ord for Blake2b256Digest
sourceimpl PartialEq<Blake2b256Digest> for Blake2b256Digest
impl PartialEq<Blake2b256Digest> for Blake2b256Digest
sourcefn eq(&self, other: &Blake2b256Digest) -> bool
fn eq(&self, other: &Blake2b256Digest) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &Blake2b256Digest) -> bool
fn ne(&self, other: &Blake2b256Digest) -> bool
This method tests for !=
.
sourceimpl PartialOrd<Blake2b256Digest> for Blake2b256Digest
impl PartialOrd<Blake2b256Digest> for Blake2b256Digest
sourcefn partial_cmp(&self, other: &Blake2b256Digest) -> Option<Ordering>
fn partial_cmp(&self, other: &Blake2b256Digest) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn 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 more
sourceimpl Serialize for Blake2b256Digest
impl Serialize for Blake2b256Digest
impl Copy for Blake2b256Digest
impl Eq for Blake2b256Digest
impl StructuralEq for Blake2b256Digest
impl StructuralPartialEq for Blake2b256Digest
Auto Trait Implementations
impl RefUnwindSafe for Blake2b256Digest
impl Send for Blake2b256Digest
impl Sync for Blake2b256Digest
impl Unpin for Blake2b256Digest
impl UnwindSafe for Blake2b256Digest
Blanket Implementations
sourceimpl<T> Base32Len for T where
T: AsRef<[u8]>,
impl<T> Base32Len for T where
T: AsRef<[u8]>,
sourcefn base32_len(&self) -> usize
fn base32_len(&self) -> usize
Calculate the base32 serialized length
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToBase32 for T where
T: AsRef<[u8]>,
impl<T> ToBase32 for T where
T: AsRef<[u8]>,
sourcefn write_base32<W>(&self, writer: &mut W) -> Result<(), <W as WriteBase32>::Err> where
W: WriteBase32,
fn write_base32<W>(&self, writer: &mut W) -> Result<(), <W as WriteBase32>::Err> where
W: WriteBase32,
Encode as base32 and write it to the supplied writer Implementations shouldn’t allocate. Read more
sourceimpl<T> ToHex for T where
T: AsRef<[u8]>,
impl<T> ToHex for T where
T: AsRef<[u8]>,
sourcefn encode_hex<U>(&self) -> U where
U: FromIterator<char>,
fn encode_hex<U>(&self) -> U where
U: FromIterator<char>,
Encode the hex strict representing self
into the result. Lower case
letters are used (e.g. f9b4ca
) Read more
sourcefn encode_hex_upper<U>(&self) -> U where
U: FromIterator<char>,
fn encode_hex_upper<U>(&self) -> U where
U: FromIterator<char>,
Encode the hex strict representing self
into the result. Upper case
letters are used (e.g. F9B4CA
) Read more