pub struct PackageSet<'cfg> { /* private fields */ }
Expand description
A set of packages, with the intent to download.
This is primarily used to convert a set of PackageId
s to Package
s. It
will download as needed, or used the cached download if available.
Implementations
sourceimpl<'cfg> PackageSet<'cfg>
impl<'cfg> PackageSet<'cfg>
pub fn new(
package_ids: &[PackageId],
sources: SourceMap<'cfg>,
config: &'cfg Config
) -> CargoResult<PackageSet<'cfg>>
pub fn package_ids(&self) -> impl Iterator<Item = PackageId> + '_
pub fn packages(&self) -> impl Iterator<Item = &Package>
pub fn enable_download<'a>(&'a self) -> CargoResult<Downloads<'a, 'cfg>>
pub fn get_one(&self, id: PackageId) -> CargoResult<&Package>
pub fn get_many(
&self,
ids: impl IntoIterator<Item = PackageId>
) -> CargoResult<Vec<&Package>>
sourcepub fn download_accessible(
&self,
resolve: &Resolve,
root_ids: &[PackageId],
has_dev_units: HasDevUnits,
requested_kinds: &[CompileKind],
target_data: &RustcTargetData,
force_all_targets: ForceAllTargets
) -> CargoResult<()>
pub fn download_accessible(
&self,
resolve: &Resolve,
root_ids: &[PackageId],
has_dev_units: HasDevUnits,
requested_kinds: &[CompileKind],
target_data: &RustcTargetData,
force_all_targets: ForceAllTargets
) -> CargoResult<()>
Downloads any packages accessible from the give root ids.
pub fn sources(&self) -> Ref<'_, SourceMap<'cfg>>
pub fn sources_mut(&self) -> RefMut<'_, SourceMap<'cfg>>
sourcepub fn add_set(&mut self, set: PackageSet<'cfg>)
pub fn add_set(&mut self, set: PackageSet<'cfg>)
Merge the given set into self.
Auto Trait Implementations
impl<'cfg> !RefUnwindSafe for PackageSet<'cfg>
impl<'cfg> !Send for PackageSet<'cfg>
impl<'cfg> !Sync for PackageSet<'cfg>
impl<'cfg> Unpin for PackageSet<'cfg>
impl<'cfg> !UnwindSafe for PackageSet<'cfg>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more