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

pub struct Downloads<'a, 'cfg: 'a> { /* fields omitted */ }

Methods

impl<'a, 'cfg> Downloads<'a, 'cfg>[src]

pub fn start(&mut self, id: PackageId) -> CargoResult<Option<&'a Package>>[src]

Starts to download the package for the id specified.

Returns None if the package is queued up for download and will eventually be returned from wait_for_download. Returns Some(pkg) if the package is ready and doesn't need to be downloaded.

pub fn remaining(&self) -> usize[src]

Returns the number of crates that are still downloading

pub fn wait(&mut self) -> CargoResult<&'a Package>[src]

Blocks the current thread waiting for a package to finish downloading.

This method will wait for a previously enqueued package to finish downloading and return a reference to it after it's done downloading.

Panics

This function will panic if there are no remaining downloads.

Trait Implementations

impl<'a, 'cfg> Drop for Downloads<'a, 'cfg>[src]

Auto Trait Implementations

impl<'a, 'cfg> !Send for Downloads<'a, 'cfg>

impl<'a, 'cfg> !Sync for Downloads<'a, 'cfg>

Blanket Implementations

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

impl<T> From for T[src]

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

impl<T, U> TryInto 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<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Same for T

type Output = T

Should always be Self