pub trait Downloader: Send + Sync {
// Required methods
fn run_download(
&self,
request: DownloadRequest<'_, Self>,
) -> impl Future<Output = Result<Vec<u8>, Error>> + Send;
fn run_download_stream(
&self,
request: DownloadStreamRequest<'_, Self>,
) -> impl Future<Output = Result<Download, Error>> + Send;
// Provided methods
fn download(&self, key: &str) -> DownloadRequest<'_, Self> { ... }
fn download_stream(&self, key: &str) -> DownloadStreamRequest<'_, Self> { ... }
}Expand description
Download objects. Implemented by a BucketRef granting
perms::Downloader.
Required Methods§
Sourcefn run_download(
&self,
request: DownloadRequest<'_, Self>,
) -> impl Future<Output = Result<Vec<u8>, Error>> + Send
fn run_download( &self, request: DownloadRequest<'_, Self>, ) -> impl Future<Output = Result<Vec<u8>, Error>> + Send
Runs the download download made, when it is
awaited.
Sourcefn run_download_stream(
&self,
request: DownloadStreamRequest<'_, Self>,
) -> impl Future<Output = Result<Download, Error>> + Send
fn run_download_stream( &self, request: DownloadStreamRequest<'_, Self>, ) -> impl Future<Output = Result<Download, Error>> + Send
Runs the download download_stream made,
when it is awaited.
Provided Methods§
Sourcefn download(&self, key: &str) -> DownloadRequest<'_, Self>
fn download(&self, key: &str) -> DownloadRequest<'_, Self>
See Bucket::download.
Sourcefn download_stream(&self, key: &str) -> DownloadStreamRequest<'_, Self>
fn download_stream(&self, key: &str) -> DownloadStreamRequest<'_, Self>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".