pub enum UpgradeEvent {
ManifestFetched {
version: String,
},
Downloading {
bytes: u64,
total: u64,
},
Verifying,
Replacing,
Done {
version: String,
backup: PathBuf,
exe: PathBuf,
},
Failed(String),
RolledBack {
exe: PathBuf,
backup: PathBuf,
},
}Expand description
Streamed progress events from the upgrade/rollback machinery.
Sender is always async-owned (the upgrade task); receivers are the
TUI event loop or the CLI stdout logger. Events are advisory —
dropping the receiver must never block the upgrade.
Variants§
ManifestFetched
Downloading
Verifying
Replacing
Done
Fields
Failed(String)
Terminal failure. Carries the display-formatted error so the UI
layer doesn’t need anyhow to render it.
RolledBack
Rollback finished. Reported through the same channel so the TUI can drive both flows with a single select arm.
Trait Implementations§
Source§impl Clone for UpgradeEvent
impl Clone for UpgradeEvent
Source§fn clone(&self) -> UpgradeEvent
fn clone(&self) -> UpgradeEvent
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for UpgradeEvent
impl RefUnwindSafe for UpgradeEvent
impl Send for UpgradeEvent
impl Sync for UpgradeEvent
impl Unpin for UpgradeEvent
impl UnsafeUnpin for UpgradeEvent
impl UnwindSafe for UpgradeEvent
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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