pub struct HashBytes(/* private fields */);Implementations§
Methods from Deref<Target = Hash>§
pub fn as_bytes(&self) -> &[u8; 32]
pub fn as_bytes(&self) -> &[u8; 32]
The raw bytes of the Hash. Note that byte arrays don’t provide
constant-time equality checking, so if you need to compare hashes,
prefer the Hash type.
pub fn as_slice(&self) -> &[u8] ⓘ
pub fn as_slice(&self) -> &[u8] ⓘ
The raw bytes of the Hash, as a slice. Useful for serialization. Note that byte arrays
don’t provide constant-time equality checking, so if you need to compare hashes, prefer
the Hash type.
pub fn to_hex(&self) -> ArrayString<blake3::::{impl#0}::to_hex::{constant#0}>
pub fn to_hex(&self) -> ArrayString<blake3::::{impl#0}::to_hex::{constant#0}>
Encode a Hash in lowercase hexadecimal.
The returned ArrayString is a fixed size and doesn’t allocate memory
on the heap. Note that ArrayString doesn’t provide constant-time
equality checking, so if you need to compare hashes, prefer the Hash
type.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for HashBytes
impl<'de> Deserialize<'de> for HashBytes
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
impl Copy for HashBytes
impl Eq for HashBytes
impl StructuralPartialEq for HashBytes
Auto Trait Implementations§
impl Freeze for HashBytes
impl RefUnwindSafe for HashBytes
impl Send for HashBytes
impl Sync for HashBytes
impl Unpin for HashBytes
impl UnwindSafe for HashBytes
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.