pub struct Digest { /* private fields */ }Expand description
A parsed OCI digest such as sha256:<hex>.
Implementations§
Source§impl OciDigest
impl OciDigest
Sourcepub fn new(
algorithm: DigestAlgorithm,
encoded: DigestValue,
) -> Result<OciDigest, OciDigestError>
pub fn new( algorithm: DigestAlgorithm, encoded: DigestValue, ) -> Result<OciDigest, OciDigestError>
Creates an OCI digest from typed parts.
Sourcepub const fn algorithm(&self) -> &DigestAlgorithm
pub const fn algorithm(&self) -> &DigestAlgorithm
Returns the digest algorithm.
Sourcepub const fn encoded(&self) -> &DigestValue
pub const fn encoded(&self) -> &DigestValue
Returns the encoded digest value.
Trait Implementations§
Source§impl Ord for OciDigest
impl Ord for OciDigest
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for OciDigest
impl PartialOrd for OciDigest
impl Eq for OciDigest
impl StructuralPartialEq for OciDigest
Auto Trait Implementations§
impl Freeze for OciDigest
impl RefUnwindSafe for OciDigest
impl Send for OciDigest
impl Sync for OciDigest
impl Unpin for OciDigest
impl UnsafeUnpin for OciDigest
impl UnwindSafe for OciDigest
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