pub struct ContentDigest { /* private fields */ }Expand description
A domain-separated BLAKE3 digest of RFC 8785 canonical JSON.
Implementations§
Source§impl ContentDigest
impl ContentDigest
Sourcepub fn compute(value: &Value) -> Result<Self, JcsError>
pub fn compute(value: &Value) -> Result<Self, JcsError>
Computes a digest with the default JSON schema identity.
Sourcepub fn compute_with_schema(
value: &Value,
schema_id: impl Into<String>,
schema_version: impl Into<String>,
) -> Result<Self, JcsError>
pub fn compute_with_schema( value: &Value, schema_id: impl Into<String>, schema_version: impl Into<String>, ) -> Result<Self, JcsError>
Computes a digest bound to an explicit schema ID and version.
Sourcepub fn metadata(&self) -> &DigestMetadata
pub fn metadata(&self) -> &DigestMetadata
Returns the identity context bound into the digest.
Trait Implementations§
Source§impl Clone for ContentDigest
impl Clone for ContentDigest
Source§fn clone(&self) -> ContentDigest
fn clone(&self) -> ContentDigest
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 ContentDigest
impl Debug for ContentDigest
Source§impl Display for ContentDigest
impl Display for ContentDigest
impl Eq for ContentDigest
Source§impl LowerHex for ContentDigest
impl LowerHex for ContentDigest
Source§impl PartialEq for ContentDigest
impl PartialEq for ContentDigest
impl StructuralPartialEq for ContentDigest
Auto Trait Implementations§
impl Freeze for ContentDigest
impl RefUnwindSafe for ContentDigest
impl Send for ContentDigest
impl Sync for ContentDigest
impl Unpin for ContentDigest
impl UnsafeUnpin for ContentDigest
impl UnwindSafe for ContentDigest
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