Skip to main content

Fetcher

Trait Fetcher 

Source
pub trait Fetcher {
    // Required method
    fn fetch(&self, dep: &Dep) -> Result<FetchedPkg, PkgError>;
}
Expand description

Abstraction over package fetch backends.

Implementations are not required to be Send or Sync — the MVP is single-threaded.

Required Methods§

Source

fn fetch(&self, dep: &Dep) -> Result<FetchedPkg, PkgError>

Fetch the package described by dep and return a FetchedPkg.

§Errors

Returns PkgError on any git, I/O, or validation failure.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§