pub struct BlobHash(pub Hash);
Expand description
The blob’s globally-unique cryptographic BLAKE3 hash.
Tuple Fields§
§0: Hash
Implementations§
Source§impl BlobHash
impl BlobHash
pub fn zero() -> Self
pub fn from_vec(bytes: &Vec<u8>) -> BlobHashResult<Self>
pub fn from_slice(bytes: &[u8]) -> BlobHashResult<Self>
pub fn from_bytes(bytes: [u8; 32]) -> Self
pub fn from_hex(input: impl AsRef<[u8]>) -> BlobHashResult<Self>
pub fn from_base58(input: impl AsRef<str>) -> BlobHashResult<Self>
Sourcepub fn to_hex(&self) -> ArrayString<64>
pub fn to_hex(&self) -> ArrayString<64>
Returns the blob’s hash as a hex string.
Trait Implementations§
Source§impl FromStr for BlobHash
impl FromStr for BlobHash
Source§type Err = BlobHashError
type Err = BlobHashError
The associated error which can be returned from parsing.
impl Copy for BlobHash
impl Eq for BlobHash
impl StructuralPartialEq for BlobHash
Auto Trait Implementations§
impl Freeze for BlobHash
impl RefUnwindSafe for BlobHash
impl Send for BlobHash
impl Sync for BlobHash
impl Unpin for BlobHash
impl UnwindSafe for BlobHash
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