Struct fidl_fuchsia_update_installer_ext::state::Progress
source · 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
§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
.§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 PartialEq for Progress
impl PartialEq for Progress
source§impl PartialOrd for Progress
impl PartialOrd for Progress
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl TryFrom<InstallationProgress> for Progress
impl TryFrom<InstallationProgress> for Progress
§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