pub struct Digest(/* private fields */);Expand description
Implementations§
Source§impl Digest
impl Digest
Sourcepub async fn compute(
&self,
data: impl Into<DataSource<'_>>,
) -> Result<Vec<u8>, Error>
pub async fn compute( &self, data: impl Into<DataSource<'_>>, ) -> Result<Vec<u8>, Error>
Digest data. The resource is reusable; the result is
chunking-invariant.
Sourcepub fn algorithm_name(&self) -> String
pub fn algorithm_name(&self) -> String
The name of the algorithm this resource is bound to, e.g.
"SHA-256" — spelled as the W3C Web Cryptography API algorithm
registry
(and crypto.subtle.digest) spells it.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Digest
impl RefUnwindSafe for Digest
impl Send for Digest
impl Sync for Digest
impl Unpin for Digest
impl UnsafeUnpin for Digest
impl UnwindSafe for Digest
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