Trait Chksumable

Source
pub trait Chksumable {
    // Required method
    fn chksum_with<H>(&mut self, hash: &mut H) -> Result<()>
       where H: Hash;

    // Provided method
    fn chksum<H>(&mut self) -> Result<H::Digest>
       where H: Hash { ... }
}
Expand description

A trait for complex objects which must be processed chunk by chunk.

Required Methods§

Source

fn chksum_with<H>(&mut self, hash: &mut H) -> Result<()>
where H: Hash,

Updates the given hash instance with the data from the object.

Provided Methods§

Source

fn chksum<H>(&mut self) -> Result<H::Digest>
where H: Hash,

Calculates the checksum of the object.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl Chksumable for &DirEntry

Source§

fn chksum_with<H>(&mut self, hash: &mut H) -> Result<()>
where H: Hash,

Source§

impl Chksumable for &File

Source§

fn chksum_with<H>(&mut self, hash: &mut H) -> Result<()>
where H: Hash,

Source§

impl Chksumable for &Stdin

Source§

fn chksum_with<H>(&mut self, hash: &mut H) -> Result<()>
where H: Hash,

Source§

impl Chksumable for &Path

Source§

fn chksum_with<H>(&mut self, hash: &mut H) -> Result<()>
where H: Hash,

Source§

impl Chksumable for &PathBuf

Source§

fn chksum_with<H>(&mut self, hash: &mut H) -> Result<()>
where H: Hash,

Source§

impl Chksumable for &mut DirEntry

Source§

fn chksum_with<H>(&mut self, hash: &mut H) -> Result<()>
where H: Hash,

Source§

impl Chksumable for &mut File

Source§

fn chksum_with<H>(&mut self, hash: &mut H) -> Result<()>
where H: Hash,

Source§

impl Chksumable for &mut ReadDir

Source§

fn chksum_with<H>(&mut self, hash: &mut H) -> Result<()>
where H: Hash,

Source§

impl Chksumable for &mut Stdin

Source§

fn chksum_with<H>(&mut self, hash: &mut H) -> Result<()>
where H: Hash,

Source§

impl Chksumable for &mut StdinLock<'_>

Source§

fn chksum_with<H>(&mut self, hash: &mut H) -> Result<()>
where H: Hash,

Source§

impl Chksumable for &mut Path

Source§

fn chksum_with<H>(&mut self, hash: &mut H) -> Result<()>
where H: Hash,

Source§

impl Chksumable for &mut PathBuf

Source§

fn chksum_with<H>(&mut self, hash: &mut H) -> Result<()>
where H: Hash,

Source§

impl Chksumable for DirEntry

Source§

fn chksum_with<H>(&mut self, hash: &mut H) -> Result<()>
where H: Hash,

Source§

impl Chksumable for File

Source§

fn chksum_with<H>(&mut self, hash: &mut H) -> Result<()>
where H: Hash,

Source§

impl Chksumable for ReadDir

Source§

fn chksum_with<H>(&mut self, hash: &mut H) -> Result<()>
where H: Hash,

Source§

impl Chksumable for Stdin

Source§

fn chksum_with<H>(&mut self, hash: &mut H) -> Result<()>
where H: Hash,

Source§

impl Chksumable for StdinLock<'_>

Source§

fn chksum_with<H>(&mut self, hash: &mut H) -> Result<()>
where H: Hash,

Source§

impl Chksumable for Path

Source§

fn chksum_with<H>(&mut self, hash: &mut H) -> Result<()>
where H: Hash,

Source§

impl Chksumable for PathBuf

Source§

fn chksum_with<H>(&mut self, hash: &mut H) -> Result<()>
where H: Hash,

Implementors§

Source§

impl<T> Chksumable for T
where T: Hashable,