Trait AsyncChksumable

Source
pub trait AsyncChksumable: Send {
    // Required method
    fn chksum_with<'life0, 'life1, 'async_trait, H>(
        &'life0 mut self,
        hash: &'life1 mut H,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where H: Hash + Send + 'async_trait,
             Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;

    // Provided method
    fn chksum<'life0, 'async_trait, H>(
        &'life0 mut self,
    ) -> Pin<Box<dyn Future<Output = Result<H::Digest>> + Send + 'async_trait>>
       where H: Hash + Send + 'async_trait,
             Self: 'async_trait,
             'life0: 'async_trait { ... }
}
Expand description

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

Required Methods§

Source

fn chksum_with<'life0, 'life1, 'async_trait, H>( &'life0 mut self, hash: &'life1 mut H, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where H: Hash + Send + 'async_trait, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

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

Provided Methods§

Source

fn chksum<'life0, 'async_trait, H>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<H::Digest>> + Send + 'async_trait>>
where H: Hash + Send + 'async_trait, Self: 'async_trait, 'life0: 'async_trait,

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 AsyncChksumable for &Path

Available on crate feature async-runtime-tokio only.
Source§

fn chksum_with<'life0, 'life1, 'async_trait, H>( &'life0 mut self, hash: &'life1 mut H, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where H: Hash + Send + 'async_trait, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

impl AsyncChksumable for &PathBuf

Available on crate feature async-runtime-tokio only.
Source§

fn chksum_with<'life0, 'life1, 'async_trait, H>( &'life0 mut self, hash: &'life1 mut H, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where H: Hash + Send + 'async_trait, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

impl AsyncChksumable for &DirEntry

Available on crate feature async-runtime-tokio only.
Source§

fn chksum_with<'life0, 'life1, 'async_trait, H>( &'life0 mut self, hash: &'life1 mut H, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where H: Hash + Send + 'async_trait, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

impl AsyncChksumable for &mut Path

Available on crate feature async-runtime-tokio only.
Source§

fn chksum_with<'life0, 'life1, 'async_trait, H>( &'life0 mut self, hash: &'life1 mut H, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where H: Hash + Send + 'async_trait, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

impl AsyncChksumable for &mut PathBuf

Available on crate feature async-runtime-tokio only.
Source§

fn chksum_with<'life0, 'life1, 'async_trait, H>( &'life0 mut self, hash: &'life1 mut H, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where H: Hash + Send + 'async_trait, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

impl AsyncChksumable for &mut File

Available on crate feature async-runtime-tokio only.
Source§

fn chksum_with<'life0, 'life1, 'async_trait, H>( &'life0 mut self, hash: &'life1 mut H, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where H: Hash + Send + 'async_trait, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

impl AsyncChksumable for &mut DirEntry

Available on crate feature async-runtime-tokio only.
Source§

fn chksum_with<'life0, 'life1, 'async_trait, H>( &'life0 mut self, hash: &'life1 mut H, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where H: Hash + Send + 'async_trait, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

impl AsyncChksumable for &mut ReadDir

Available on crate feature async-runtime-tokio only.
Source§

fn chksum_with<'life0, 'life1, 'async_trait, H>( &'life0 mut self, hash: &'life1 mut H, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where H: Hash + Send + 'async_trait, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

impl AsyncChksumable for &mut Stdin

Available on crate feature async-runtime-tokio only.
Source§

fn chksum_with<'life0, 'life1, 'async_trait, H>( &'life0 mut self, hash: &'life1 mut H, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where H: Hash + Send + 'async_trait, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

impl AsyncChksumable for Path

Available on crate feature async-runtime-tokio only.
Source§

fn chksum_with<'life0, 'life1, 'async_trait, H>( &'life0 mut self, hash: &'life1 mut H, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where H: Hash + Send + 'async_trait, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

impl AsyncChksumable for PathBuf

Available on crate feature async-runtime-tokio only.
Source§

fn chksum_with<'life0, 'life1, 'async_trait, H>( &'life0 mut self, hash: &'life1 mut H, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where H: Hash + Send + 'async_trait, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

impl AsyncChksumable for File

Available on crate feature async-runtime-tokio only.
Source§

fn chksum_with<'life0, 'life1, 'async_trait, H>( &'life0 mut self, hash: &'life1 mut H, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where H: Hash + Send + 'async_trait, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

impl AsyncChksumable for DirEntry

Available on crate feature async-runtime-tokio only.
Source§

fn chksum_with<'life0, 'life1, 'async_trait, H>( &'life0 mut self, hash: &'life1 mut H, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where H: Hash + Send + 'async_trait, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

impl AsyncChksumable for ReadDir

Available on crate feature async-runtime-tokio only.
Source§

fn chksum_with<'life0, 'life1, 'async_trait, H>( &'life0 mut self, hash: &'life1 mut H, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where H: Hash + Send + 'async_trait, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

impl AsyncChksumable for Stdin

Available on crate feature async-runtime-tokio only.
Source§

fn chksum_with<'life0, 'life1, 'async_trait, H>( &'life0 mut self, hash: &'life1 mut H, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where H: Hash + Send + 'async_trait, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Implementors§

Source§

impl<T> AsyncChksumable for T
where T: Hashable + Send,