pub enum FlashEvent {
Stage(FlashStage),
Progress {
bytes_written: u64,
total_bytes: u64,
speed_mb_s: f32,
},
VerifyProgress {
phase: &'static str,
bytes_read: u64,
total_bytes: u64,
speed_mb_s: f32,
},
Log(String),
Done,
Error(String),
}Expand description
A typed event emitted by the flash pipeline.
Sent over std::sync::mpsc to the async Iced subscription — no
serialisation, no text parsing.
Variants§
Stage(FlashStage)
A pipeline stage transition.
Progress
Write-progress update.
VerifyProgress
Verification read-back progress update.
Emitted during both the image-hash pass and the device read-back pass.
phase is "image" for the source-hash pass and "device" for the
read-back pass. bytes_read and total_bytes are the counts for the
current pass only; the overall verify progress should be computed as:
if phase == "image" { bytes_read / total_bytes * 0.5 }
if phase == "device" { 0.5 + bytes_read / total_bytes * 0.5 }Log(String)
Informational log message (not an error).
Done
The pipeline finished successfully.
Error(String)
The pipeline failed; the string is a human-readable error.
Trait Implementations§
Source§impl Clone for FlashEvent
impl Clone for FlashEvent
Source§fn clone(&self) -> FlashEvent
fn clone(&self) -> FlashEvent
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FlashEvent
impl Debug for FlashEvent
Source§impl From<FlashEvent> for FlashUpdate
impl From<FlashEvent> for FlashUpdate
Source§fn from(event: FlashEvent) -> Self
fn from(event: FlashEvent) -> Self
Convert a raw pipeline FlashEvent into a FlashUpdate.
Progressraw byte counts → normalised0.0–1.0fraction.VerifyProgressper-pass fraction → overall0.0–1.0viaverify_overall_progress.Stagedisplay string andLogstring →Message.Done→Completed,Error→Failed.
Auto Trait Implementations§
impl Freeze for FlashEvent
impl RefUnwindSafe for FlashEvent
impl Send for FlashEvent
impl Sync for FlashEvent
impl Unpin for FlashEvent
impl UnsafeUnpin for FlashEvent
impl UnwindSafe for FlashEvent
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