Struct cargo::core::package::PackageSet [−][src]
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
impl<'cfg> PackageSet<'cfg>
[src]
pub fn new(
package_ids: &[PackageId],
sources: SourceMap<'cfg>,
config: &'cfg Config
) -> CargoResult<PackageSet<'cfg>>
[src]
package_ids: &[PackageId],
sources: SourceMap<'cfg>,
config: &'cfg Config
) -> CargoResult<PackageSet<'cfg>>
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]
&self,
ids: impl IntoIterator<Item = PackageId>
) -> CargoResult<Vec<&Package>>
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
[src]
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[src]
V: MultiLane<T>,