pub struct Bash(/* private fields */);Expand description
BLAKE3 hash (32 bytes) of any number of fields.
Default SerDe implementation uses hex representation.
Implementations§
Source§impl Bash
impl Bash
pub const LEN: usize = 32
Sourcepub fn delimited(components: &[&[u8]], delimiter: u8) -> Self
pub fn delimited(components: &[&[u8]], delimiter: u8) -> Self
Hashes components separated by a delimiter byte. Callers must ensure components do not contain the delimiter.
Sourcepub fn length_prefixed(components: &[&[u8]]) -> Self
pub fn length_prefixed(components: &[&[u8]]) -> Self
Hashes components with length prefixes to avoid separator ambiguity.
pub fn as_bytes(&self) -> &[u8; 32]
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Bash
impl<'de> Deserialize<'de> for Bash
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 Bash
impl Eq for Bash
impl StructuralPartialEq for Bash
Auto Trait Implementations§
impl Freeze for Bash
impl RefUnwindSafe for Bash
impl Send for Bash
impl Sync for Bash
impl Unpin for Bash
impl UnwindSafe for Bash
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,
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
Fallible version of
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a
CompactString. Read more