Skip to main content

Downloader

Trait Downloader 

Source
pub trait Downloader: Send + Sync {
    // Required methods
    fn download_with(
        &self,
        key: &str,
        options: DownloadOptions,
    ) -> impl Future<Output = Result<Vec<u8>, Error>> + Send;
    fn download_stream(
        &self,
        key: &str,
        options: DownloadOptions,
    ) -> impl Future<Output = Result<Download, Error>> + Send;

    // Provided method
    fn download(
        &self,
        key: &str,
    ) -> impl Future<Output = Result<Vec<u8>, Error>> + Send { ... }
}
Expand description

Download objects. Implemented by a BucketRef granting perms::Downloader.

Required Methods§

Source

fn download_with( &self, key: &str, options: DownloadOptions, ) -> impl Future<Output = Result<Vec<u8>, Error>> + Send

Source

fn download_stream( &self, key: &str, options: DownloadOptions, ) -> impl Future<Output = Result<Download, Error>> + Send

Provided Methods§

Source

fn download( &self, key: &str, ) -> impl Future<Output = Result<Vec<u8>, Error>> + Send

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§

Source§

impl<P: BucketPerms> Downloader for BucketRef<P>
where P::Download: Granted<Downloader>,