[][src]Enum cargo_lock::package::checksum::Checksum

pub enum Checksum {
    Sha256([u8; 32]),
}

Cryptographic checksum (SHA-256) for a package

Variants

Sha256([u8; 32])

SHA-256 digest of a package

Methods

impl Checksum[src]

pub fn is_sha256(&self) -> bool[src]

Is this checksum SHA-256?

pub fn as_sha256(&self) -> Option<[u8; 32]>[src]

If this is a SHA-256 checksum, get the raw bytes

Trait Implementations

impl Clone for Checksum[src]

impl Debug for Checksum[src]

impl<'de> Deserialize<'de> for Checksum[src]

impl Display for Checksum[src]

impl Eq for Checksum[src]

impl From<[u8; 32]> for Checksum[src]

impl FromStr for Checksum[src]

type Err = Error

The associated error which can be returned from parsing.

impl Hash for Checksum[src]

impl LowerHex for Checksum[src]

impl Ord for Checksum[src]

impl PartialEq<Checksum> for Checksum[src]

impl PartialOrd<Checksum> for Checksum[src]

impl Serialize for Checksum[src]

impl StructuralEq for Checksum[src]

impl StructuralPartialEq for Checksum[src]

impl<'_> TryFrom<&'_ Value> for Checksum[src]

type Error = Error

The type returned in the event of a conversion error.

impl UpperHex for Checksum[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.