pub struct Blake3Hash(/* private fields */);Expand description
BLAKE3 hash wrapper (256-bit = 64 hex characters)
Implementations§
Source§impl Blake3Hash
impl Blake3Hash
Sourcepub fn from_hex(hex: String) -> Result<Self, String>
pub fn from_hex(hex: String) -> Result<Self, String>
Create a Blake3Hash from a 64-character lowercase hex string.
PR #66 doctrine fix: prior to this version, is_ascii_hexdigit matched
both uppercase and lowercase, so two distinct Blake3Hash values could
be constructed from the same underlying digest (e.g. “ab…” vs “AB…”).
Receipts and provenance chains compare hashes via PartialEq on the
inner string, so mixed-case acceptance produced silent equality failures.
Canonical BLAKE3 hex is lowercase — reject everything else.
Trait Implementations§
Source§impl AsRef<str> for Blake3Hash
impl AsRef<str> for Blake3Hash
Source§impl Clone for Blake3Hash
impl Clone for Blake3Hash
Source§fn clone(&self) -> Blake3Hash
fn clone(&self) -> Blake3Hash
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 Blake3Hash
impl Debug for Blake3Hash
Source§impl<'de> Deserialize<'de> for Blake3Hash
impl<'de> Deserialize<'de> for Blake3Hash
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
Source§impl Display for Blake3Hash
impl Display for Blake3Hash
Source§impl Hash for Blake3Hash
impl Hash for Blake3Hash
Source§impl PartialEq for Blake3Hash
impl PartialEq for Blake3Hash
Source§fn eq(&self, other: &Blake3Hash) -> bool
fn eq(&self, other: &Blake3Hash) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for Blake3Hash
impl Serialize for Blake3Hash
impl Eq for Blake3Hash
impl StructuralPartialEq for Blake3Hash
Auto Trait Implementations§
impl Freeze for Blake3Hash
impl RefUnwindSafe for Blake3Hash
impl Send for Blake3Hash
impl Sync for Blake3Hash
impl Unpin for Blake3Hash
impl UnsafeUnpin for Blake3Hash
impl UnwindSafe for Blake3Hash
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.