pub struct Digest { /* private fields */ }Expand description
A content-addressable digest in the format algorithm:hex.
Currently only SHA256 is supported as per OCI specification.
Implementations§
Source§impl Digest
impl Digest
Sourcepub fn new(algorithm: Algorithm, hex: impl Into<String>) -> Result<Self, Error>
pub fn new(algorithm: Algorithm, hex: impl Into<String>) -> Result<Self, Error>
Creates a new digest from algorithm and hex string.
The hex string is normalized to lowercase per OCI specification.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Digest
impl<'de> Deserialize<'de> for Digest
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Digest
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