Struct cargo::core::package::Downloads [−][src]
Helper for downloading crates.
Implementations
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
Auto Trait Implementations
impl<'a, 'cfg> !RefUnwindSafe for Downloads<'a, 'cfg>
impl<'a, 'cfg> !Send for Downloads<'a, 'cfg>
impl<'a, 'cfg> !Sync for Downloads<'a, 'cfg>
impl<'a, 'cfg> Unpin for Downloads<'a, 'cfg> where
'cfg: 'a,
'cfg: 'a,
impl<'a, 'cfg> !UnwindSafe for Downloads<'a, '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>,