pub struct Hash(/* private fields */);Expand description
Hash of Entry or Operation encoded as hex string.
This uses the BLAKE3 algorithm wrapped in YASMF “Yet-Another-Smol-Multi-Format” according
to the Bamboo specification.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Hash
impl<'de> Deserialize<'de> for Hash
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 From<&Hash> for YasmfHash<ArrayVec<[u8; 32]>>
Returns Yet-Another-Smol-Multiformat Hash struct from the yasmf-hash crate.
impl From<&Hash> for YasmfHash<ArrayVec<[u8; 32]>>
Returns Yet-Another-Smol-Multiformat Hash struct from the yasmf-hash crate.
This comes in handy when interacting with the bamboo-rs crate.
Source§impl<T: Borrow<[u8]> + Clone> From<&YasmfHash<T>> for Hash
Converts YASMF hash from yasmf-hash crate to p2panda Hash instance.
impl<T: Borrow<[u8]> + Clone> From<&YasmfHash<T>> for Hash
Converts YASMF hash from yasmf-hash crate to p2panda Hash instance.
Source§impl From<Hash> for DocumentId
impl From<Hash> for DocumentId
Source§impl From<Hash> for DocumentViewHash
impl From<Hash> for DocumentViewHash
Source§impl From<Hash> for DocumentViewId
Convenience method converting a single hash into a document view id.
impl From<Hash> for DocumentViewId
Convenience method converting a single hash into a document view id.
Converts a Hash instance into a DocumentViewId, assuming that this document view only
consists of one graph tip hash.
Source§impl From<Hash> for OperationId
impl From<Hash> for OperationId
Source§impl Ord for Hash
impl Ord for Hash
Source§impl PartialOrd for Hash
impl PartialOrd for Hash
Source§impl TryFrom<&str> for Hash
Convert any hex-encoded string representation of a hash into a Hash instance.
impl TryFrom<&str> for Hash
Convert any hex-encoded string representation of a hash into a Hash instance.
impl Eq for Hash
impl StructuralPartialEq for Hash
Auto Trait Implementations§
impl Freeze for Hash
impl RefUnwindSafe for Hash
impl Send for Hash
impl Sync for Hash
impl Unpin for Hash
impl UnwindSafe for Hash
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more