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 PartialOrd for Progress
impl PartialOrd for Progress
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§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
Source§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more