pub struct ContentHasher(/* private fields */);Expand description
An incremental SHA-256 over a blob’s plaintext, so the streaming download path
verifies a blob’s content hash without holding the whole plaintext in memory:
feed each decrypted chunk to update, call
finish, and compare the returned digest with the row’s hash
before committing the bytes to the cache. The hex-encoded digest matches
content_hash over the same bytes.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ContentHasher
impl RefUnwindSafe for ContentHasher
impl Send for ContentHasher
impl Sync for ContentHasher
impl Unpin for ContentHasher
impl UnsafeUnpin for ContentHasher
impl UnwindSafe for ContentHasher
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
§fn null_value() -> T
fn null_value() -> T
The none-equivalent value.