pub struct AptAcquireProgress { /* private fields */ }
Expand description

AptAcquireProgress is the default struct for the update method on the cache.

This struct mimics the output of apt update.

Implementations

Returns a new default progress instance.

Return the AptAcquireProgress in a box To easily pass through for progress

Returns a disabled progress instance. No output will be shown.

Trait Implementations

Used to send the pulse interval to the apt progress class.

Pulse Interval is in microseconds.

Example: 1 second = 1000000 microseconds.

Apt default is 500000 microseconds or 0.5 seconds.

The higher the number, the less frequent pulse updates will be.

Pulse Interval set to 0 assumes the apt defaults.

Called when an item is confirmed to be up-to-date.

Prints out the short description and the expected size.

Called when an Item has started to download

Prints out the short description and the expected size.

Called when an item is successfully and completely fetched.

We don’t print anything here to remain consistent with apt.

TODO: Pass through information here. Likely when we make a general struct fork the items.

Called when progress has started.

Start does not pass information into the method.

We do not print anything here to remain consistent with apt. lastline length is set to 0 to ensure consistency when progress begins.

Called when progress has finished.

Stop does not pass information into the method.

prints out the bytes downloaded and the overall average line speed.

Called when an Item fails to download.

Print out the ErrorText for the Item.

Called periodically to provide the overall progress information

Draws the current progress. Each line has an overall percent meter and a per active item status meter along with an overall bandwidth and ETA indicator.

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.