#[non_exhaustive]pub enum FlashError<E> {
Entry(Error<E>),
Transfer {
offset: usize,
length: usize,
source: Error<E>,
},
Fault {
stage: Stage,
sense: Triplet,
},
ReadyTimeout(Error<E>),
Startup(StartupError<E>),
Mismatch {
address: usize,
read: u8,
wrote: u8,
differing: usize,
checked: usize,
},
Incomplete {
unverified: usize,
checked: usize,
},
}Expand description
A failed flash. Every variant after FlashError::Entry may leave the
drive holding partial or unverified firmware; nothing is retried or rolled
back.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Entry(Error<E>)
PROBE, TEST UNIT READY or PREPARE failed; no firmware data was sent. If PREPARE was reached the drive may be in update mode.
Transfer
A STREAM write failed.
Fields
Fault
REQUEST SENSE reported a programming failure.
ReadyTimeout(Error<E>)
The drive did not answer TEST UNIT READY within
crate::DriveClass::ready_timeout; the last poll’s error.
Startup(StartupError<E>)
Readiness/read-back completed, but the selected target was not confirmed running.
Mismatch
A protected byte read back differently.
Fields
Incomplete
Chunks holding protected bytes could not be read back.
Trait Implementations§
Source§impl<E> CodedError for FlashError<E>
Available on crate features drive and image only.
impl<E> CodedError for FlashError<E>
Available on crate features
drive and image only.Source§impl<E: Debug> Debug for FlashError<E>
impl<E: Debug> Debug for FlashError<E>
Source§impl<E: Debug> Display for FlashError<E>
impl<E: Debug> Display for FlashError<E>
Source§impl<E: Debug + 'static> Error for FlashError<E>
impl<E: Debug + 'static> Error for FlashError<E>
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl<E> Freeze for FlashError<E>
impl<E> RefUnwindSafe for FlashError<E>
impl<E> Send for FlashError<E>
impl<E> Sync for FlashError<E>
impl<E> Unpin for FlashError<E>
impl<E> UnsafeUnpin for FlashError<E>
impl<E> UnwindSafe for FlashError<E>
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