Skip to main content

Hashed

Trait Hashed 

Source
pub trait Hashed {
    // Required method
    fn hashes(&self) -> &[HashDigest];

    // Provided methods
    fn satisfies(&self, hashes: HashPolicy<'_>) -> bool { ... }
    fn has_digests(&self, hashes: HashPolicy<'_>) -> bool { ... }
}

Required Methods§

Source

fn hashes(&self) -> &[HashDigest]

Return the HashDigests for the archive.

Provided Methods§

Source

fn satisfies(&self, hashes: HashPolicy<'_>) -> bool

Returns true if the archive satisfies the given hash policy.

Source

fn has_digests(&self, hashes: HashPolicy<'_>) -> bool

Returns true if the archive includes the algorithms required by the given hash policy.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl Hashed for &[HashDigest]

Source§

fn hashes(&self) -> &[HashDigest]

Source§

impl Hashed for Vec<HashDigest>

Source§

fn hashes(&self) -> &[HashDigest]

Implementors§