Skip to main content

Downloader

Trait Downloader 

Source
pub trait Downloader: Send + Sync {
    // Required method
    fn run_download(
        &self,
        request: DownloadRequest<'_, Self>,
    ) -> impl Future<Output = Result<Download, Error>> + Send;

    // Provided method
    fn download(&self, key: &str) -> DownloadRequest<'_, Self> { ... }
}
Expand description

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

Required Methods§

Source

fn run_download( &self, request: DownloadRequest<'_, Self>, ) -> impl Future<Output = Result<Download, Error>> + Send

Runs the download download made, when it is awaited. A fake answers with Download::of.

Provided Methods§

Source

fn download(&self, key: &str) -> DownloadRequest<'_, Self>

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>,