[][src]Struct cargo::core::package::PackageSet

pub struct PackageSet<'cfg> { /* fields omitted */ }

A set of packages, with the intent to download.

This is primarily used to convert a set of PackageIds to Packages. It will download as needed, or used the cached download if available.

Implementations

impl<'cfg> PackageSet<'cfg>[src]

pub fn new(
    package_ids: &[PackageId],
    sources: SourceMap<'cfg>,
    config: &'cfg Config
) -> CargoResult<PackageSet<'cfg>>
[src]

pub fn package_ids<'a>(&'a self) -> impl Iterator<Item = PackageId> + 'a[src]

pub fn enable_download<'a>(&'a self) -> CargoResult<Downloads<'a, 'cfg>>[src]

pub fn get_one(&self, id: PackageId) -> CargoResult<&Package>[src]

pub fn get_many(
    &self,
    ids: impl IntoIterator<Item = PackageId>
) -> CargoResult<Vec<&Package>>
[src]

pub fn download_accessible(
    &self,
    resolve: &Resolve,
    root_ids: &[PackageId],
    has_dev_units: HasDevUnits,
    requested_kind: CompileKind,
    target_data: &RustcTargetData
) -> CargoResult<()>
[src]

Downloads any packages accessible from the give root ids.

pub fn sources(&self) -> Ref<SourceMap<'cfg>>[src]

pub fn sources_mut(&self) -> RefMut<SourceMap<'cfg>>[src]

pub fn add_set(&mut self, set: PackageSet<'cfg>)[src]

Merge the given set into self.

pub fn lookup_mut(&mut self, id: PackageId) -> Option<&mut Package>[src]

Get mutable access to an already downloaded package, if it's already downoaded and it's part of this set. Does not actually attempt to download anything if it's not already downloaded.

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

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,