# Trait flechasdb::asyncdb::io::HashedFileIn

source ·

    pub trait HashedFileIn: AsyncRead + Send + Unpin {
        // Required method
        fn verify<'async_trait>(
            self
        ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
           where Self: 'async_trait;
    }

Expand description

File whose contents can be verified with the hash.

## Required Methods§

source

#### fn verify<'async_trait>( self ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where Self: 'async_trait,

Verifies the file contents.

Finishes the calculation of the hash and verifies the contents. You should call this function after the entire file has been read.

File name is supposed to contain a Base64 encoded URL-safe SHA256 digest of the contents, but it is up to implementation.

Fails with `Error::VerificationFailure` if the contents cannot be verified.

## Implementors§

source§

### impl HashedFileIn for LocalHashedFileIn

source§

### impl<R> HashedFileIn for CompressedHashedFileIn<R>where R: HashedFileIn,