pub struct Progress { /* private fields */ }
Expand description
Mutable progress information for an update attempt.
Implementations§
Source§impl Progress
impl Progress
Sourcepub fn done(info: &UpdateInfo) -> Self
pub fn done(info: &UpdateInfo) -> Self
Produces a Progress at 100% complete and all bytes downloaded, based on the download_size
in info
.
Sourcepub fn fraction_completed(&self) -> f32
pub fn fraction_completed(&self) -> f32
Gets the fraction_completed field.
Sourcepub fn bytes_downloaded(&self) -> u64
pub fn bytes_downloaded(&self) -> u64
Gets the bytes_downloaded field.
Trait Implementations§
Source§impl Arbitrary for Progress
impl Arbitrary for Progress
Source§type Parameters = <u64 as Arbitrary>::Parameters
type Parameters = <u64 as Arbitrary>::Parameters
The type of parameters that
arbitrary_with
accepts for configuration
of the generated Strategy
. Parameters must implement Default
.Source§type Strategy = Map<(BoxedStrategy<f32>, <u64 as Arbitrary>::Strategy), fn(_: (f32, u64)) -> Progress>
type Strategy = Map<(BoxedStrategy<f32>, <u64 as Arbitrary>::Strategy), fn(_: (f32, u64)) -> Progress>
The type of
Strategy
used to generate values of type Self
.Source§fn arbitrary_with(_top: Self::Parameters) -> Self::Strategy
fn arbitrary_with(_top: Self::Parameters) -> Self::Strategy
Source§impl<'de> Deserialize<'de> for Progress
impl<'de> Deserialize<'de> for Progress
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<Progress> for InstallationProgress
impl From<Progress> for InstallationProgress
Source§impl PartialOrd for Progress
impl PartialOrd for Progress
Source§impl TryFrom<InstallationProgress> for Progress
impl TryFrom<InstallationProgress> for Progress
Source§type Error = DecodeProgressError
type Error = DecodeProgressError
The type returned in the event of a conversion error.
impl Copy for Progress
impl StructuralPartialEq for Progress
Auto Trait Implementations§
impl Freeze for Progress
impl RefUnwindSafe for Progress
impl Send for Progress
impl Sync for Progress
impl Unpin for Progress
impl UnwindSafe for Progress
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)