Struct rustup_available_packages::Downloader [−][src]
pub struct Downloader<S, C = NoopCache> { /* fields omitted */ }
Manifests downloader and parser.
Methods
impl<'a> Downloader<DefaultSource<'a>>[src]
impl<'a> Downloader<DefaultSource<'a>>pub fn with_default_source(channel: &'a str) -> Self[src]
pub fn with_default_source(channel: &'a str) -> SelfCreate a new instance of the Downloader with a DefaultSource.
impl<S> Downloader<S>[src]
impl<S> Downloader<S>pub fn new(source: S) -> Self[src]
pub fn new(source: S) -> SelfCreate a new instance of the Downloader with a provided instance of SourceInfo.
impl<S, C> Downloader<S, C> where
S: SourceInfo,
C: Cache, [src]
impl<S, C> Downloader<S, C> where
S: SourceInfo,
C: Cache, pub fn set_cache<NewCache: Cache>(self, c: NewCache) -> Downloader<S, NewCache>[src]
pub fn set_cache<NewCache: Cache>(self, c: NewCache) -> Downloader<S, NewCache>Sets a cache for the downloader. By default a NoopCache is used.
pub fn get_last_manifests(&self, days: usize) -> Result<Vec<Manifest>, Error>[src]
pub fn get_last_manifests(&self, days: usize) -> Result<Vec<Manifest>, Error>Get latest available manifests for given days. If days is 0 or 1 only the latest
manifest is fetched.
The returned vector is sorted in descending order of dates.
This call is never cached.
pub fn get_manifest(&self, day: NaiveDate) -> Result<Manifest, Error>[src]
pub fn get_manifest(&self, day: NaiveDate) -> Result<Manifest, Error>Gets manifest for a given date. If the date is None, the latest available manifest is
requested.
pub fn get_latest_manifest(&self) -> Result<Manifest, Error>[src]
pub fn get_latest_manifest(&self) -> Result<Manifest, Error>Gets manifest for a given date. If the date is None, the latest available manifest is
requested.
pub fn get_manifest_by_url(
&self,
url: impl AsRef<str>
) -> Result<Manifest, Error>[src]
pub fn get_manifest_by_url(
&self,
url: impl AsRef<str>
) -> Result<Manifest, Error>Fetches a manifest from a given url.
Auto Trait Implementations
impl<S, C> Send for Downloader<S, C> where
C: Send,
S: Send,
impl<S, C> Send for Downloader<S, C> where
C: Send,
S: Send, impl<S, C> Sync for Downloader<S, C> where
C: Sync,
S: Sync,
impl<S, C> Sync for Downloader<S, C> where
C: Sync,
S: Sync,