pub struct ContentDigest(/* private fields */);Expand description
A SHA-256 digest of content bytes, after content coding and before framing.
This value can also describe representation data in Repr-Digest, provided
the caller hashes the entire selected representation, not a range or an
empty HEAD response. JSON canonicalization is not part of RFC 9530 hashing.
Implementations§
Source§impl ContentDigest
impl ContentDigest
Sourcepub const fn from_bytes(bytes: [u8; 32]) -> Self
pub const fn from_bytes(bytes: [u8; 32]) -> Self
Wraps a previously computed SHA-256 hash.
Sourcepub fn to_field_value(self) -> String
pub fn to_field_value(self) -> String
Serializes the RFC 9530 dictionary using padded standard Base64.
Trait Implementations§
Source§impl Clone for ContentDigest
impl Clone for ContentDigest
impl Copy for ContentDigest
Source§impl Debug for ContentDigest
impl Debug for ContentDigest
impl Eq 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
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§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.