pub trait FlashRuntime<E> {
// Required methods
fn elapsed(&self) -> Duration;
fn sleep(&mut self, duration: Duration);
// Provided methods
fn starting(&mut self, _bytes: usize) { ... }
fn progress(&mut self, _written: usize, _total: usize) { ... }
fn recovery_entry_failed(&mut self, _error: &Error<E>) { ... }
fn commit_failed(&mut self, _error: &Error<E>) { ... }
fn commit_not_ready(&mut self, _error: &Error<E>) { ... }
fn status(&mut self, _stage: Stage, _status: Status<'_, E>) { ... }
fn uploaded(&mut self, _bytes: usize) { ... }
fn poll_failed(&mut self, _elapsed: Duration, _error: &Error<E>) { ... }
fn verifying(&mut self) { ... }
fn unverified(&mut self, _offset: usize, _length: usize, _error: &Error<E>) { ... }
}Expand description
Host timing and progress for receiver-bound update execution.
Required Methods§
Sourcefn elapsed(&self) -> Duration
fn elapsed(&self) -> Duration
Monotonic time from a fixed origin; must advance across
FlashRuntime::sleep.
Provided Methods§
Sourcefn recovery_entry_failed(&mut self, _error: &Error<E>)
fn recovery_entry_failed(&mut self, _error: &Error<E>)
Explicit Recovery only: PREPARE failed, was not retried, and recovery proceeds to the selected image. Hosts should persist the full error. Normal Flash never invokes this callback and aborts on entry failure.
Sourcefn commit_failed(&mut self, _error: &Error<E>)
fn commit_failed(&mut self, _error: &Error<E>)
COMMIT failed. The drive programmed when the last chunk landed and may answer COMMIT while it reinitializes, so the flash goes on to its checks.
Sourcefn commit_not_ready(&mut self, _error: &Error<E>)
fn commit_not_ready(&mut self, _error: &Error<E>)
TEST UNIT READY right after COMMIT failed; expected while programming.
Sourcefn status(&mut self, _stage: Stage, _status: Status<'_, E>)
fn status(&mut self, _stage: Stage, _status: Status<'_, E>)
A REQUEST SENSE outcome that does not fail the flash.
Sourcefn poll_failed(&mut self, _elapsed: Duration, _error: &Error<E>)
fn poll_failed(&mut self, _elapsed: Duration, _error: &Error<E>)
A readiness poll failed after elapsed of polling.
Sourcefn unverified(&mut self, _offset: usize, _length: usize, _error: &Error<E>)
fn unverified(&mut self, _offset: usize, _length: usize, _error: &Error<E>)
A chunk holding protected bytes could not be read back in full.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".