Skip to main content

GithubImageDownloader

Trait GithubImageDownloader 

Source
pub trait GithubImageDownloader: Send + Sync {
    // Required method
    fn download(
        &self,
        url: &Url,
        maximum_bytes: usize,
    ) -> Result<Option<DownloadedGithubImage>, String>;
}
Expand description

Synchronous downloader used inside a deferred worker. Tests can replace it with a deterministic fixture downloader that records URLs and byte budgets.

Required Methods§

Source

fn download( &self, url: &Url, maximum_bytes: usize, ) -> Result<Option<DownloadedGithubImage>, String>

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§