#[non_exhaustive]pub struct Digest {
pub digest: Option<Digest>,
/* private fields */
}Expand description
A Digest holds a cryptographic message digest.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.digest: Option<Digest>Required. The message digest.
Implementations§
Source§impl Digest
impl Digest
pub fn new() -> Self
Sourcepub fn set_digest<T: Into<Option<Digest>>>(self, v: T) -> Self
pub fn set_digest<T: Into<Option<Digest>>>(self, v: T) -> Self
Sourcepub fn sha256(&self) -> Option<&Bytes>
pub fn sha256(&self) -> Option<&Bytes>
The value of digest
if it holds a Sha256, None if the field is not set or
holds a different branch.
Sourcepub fn set_sha256<T: Into<Bytes>>(self, v: T) -> Self
pub fn set_sha256<T: Into<Bytes>>(self, v: T) -> Self
Sourcepub fn sha384(&self) -> Option<&Bytes>
pub fn sha384(&self) -> Option<&Bytes>
The value of digest
if it holds a Sha384, None if the field is not set or
holds a different branch.
Sourcepub fn set_sha384<T: Into<Bytes>>(self, v: T) -> Self
pub fn set_sha384<T: Into<Bytes>>(self, v: T) -> Self
Sourcepub fn sha512(&self) -> Option<&Bytes>
pub fn sha512(&self) -> Option<&Bytes>
The value of digest
if it holds a Sha512, None if the field is not set or
holds a different branch.
Sourcepub fn set_sha512<T: Into<Bytes>>(self, v: T) -> Self
pub fn set_sha512<T: Into<Bytes>>(self, v: T) -> Self
Trait Implementations§
impl StructuralPartialEq for Digest
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