Struct elba::retrieve::Retriever [−][src]
pub struct Retriever<'cache> { pub logger: Logger, pub def_index: IndexRes, // some fields omitted }
Retrieves the best packages using both the indices available and a lockfile. By default, prioritizes using a lockfile.
Fields
logger: Logger
def_index: IndexRes
Methods
impl<'cache> Retriever<'cache>
[src]
impl<'cache> Retriever<'cache>
pub fn new(
plog: &Logger,
cache: &'cache Cache,
root: Summary,
root_deps: Vec<(PackageId, Constraint)>,
indices: Indices,
lockfile: Graph<Summary>,
def_index: IndexRes
) -> Self
[src]
pub fn new(
plog: &Logger,
cache: &'cache Cache,
root: Summary,
root_deps: Vec<(PackageId, Constraint)>,
indices: Indices,
lockfile: Graph<Summary>,
def_index: IndexRes
) -> Self
pub fn retrieve_packages(
&mut self,
solve: &Graph<Summary>
) -> Res<Graph<Source>>
[src]
pub fn retrieve_packages(
&mut self,
solve: &Graph<Summary>
) -> Res<Graph<Source>>
Loads all of the packages selected in a Solve into the Cache, returning a new graph of all the Sources.
This downloads all the packages into the cache. If we wanted to parallelize downloads later, this is where we'd deal with all the Tokio stuff.
pub fn best(
&mut self,
pkg: &PackageId,
con: &Constraint,
minimize: bool
) -> Result<Version, Error>
[src]
pub fn best(
&mut self,
pkg: &PackageId,
con: &Constraint,
minimize: bool
) -> Result<Version, Error>
Chooses the best version of a package given a constraint.
pub fn incompats(
&mut self,
pkg: &Summary
) -> Result<Vec<Incompatibility>, Error>
[src]
pub fn incompats(
&mut self,
pkg: &Summary
) -> Result<Vec<Incompatibility>, Error>
Returns a Vec<Incompatibility>
corresponding to the package's dependencies.
pub fn count_versions(&self, pkg: &PackageId) -> usize
[src]
pub fn count_versions(&self, pkg: &PackageId) -> usize
pub fn root(&self) -> &Summary
[src]
pub fn root(&self) -> &Summary
pub fn direct_checkout(
&mut self,
pkg: &PackageId,
loc: &DirectRes
) -> Res<&Source>
[src]
pub fn direct_checkout(
&mut self,
pkg: &PackageId,
loc: &DirectRes
) -> Res<&Source>