#[non_exhaustive]pub enum PrepareError {
Size(usize),
Integrity,
DriveRead,
UnknownChip,
UnknownDriveChip,
ChipMismatch {
image: Chip,
drive: Chip,
},
InstalledMismatch,
UnknownInstalledFamily,
UnknownTargetFamily,
FamilyMismatch {
installed: Family,
target: Family,
},
}Expand description
Why an update was refused before any device command.
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.
Size(usize)
The image is not layout::IMAGE_SIZE bytes.
Integrity
The image fails its AES-CMAC integrity table.
DriveRead
The image is a raw drive read: its boot page is the read-back mirror, and writing it would store that page in place of the boot page.
UnknownChip
The image names no supported chip.
UnknownDriveChip
The drive’s boot banner names no supported chip generation.
ChipMismatch
The image is for another chip than the drive’s.
InstalledMismatch
The installed firmware is not a complete image of the live drive: its size, identity descriptor or boot banner differ.
UnknownInstalledFamily
The installed firmware does not establish a hardware family.
UnknownTargetFamily
The image does not establish a hardware family.
FamilyMismatch
The image is for other hardware than the installed firmware.
Trait Implementations§
Source§impl Clone for PrepareError
impl Clone for PrepareError
Source§impl Debug for PrepareError
impl Debug for PrepareError
Source§impl Display for PrepareError
impl Display for PrepareError
impl Eq for PrepareError
Source§impl Error for PrepareError
impl Error for PrepareError
1.30.0 · 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()
Source§impl PartialEq for PrepareError
impl PartialEq for PrepareError
impl StructuralPartialEq for PrepareError
Auto Trait Implementations§
impl Freeze for PrepareError
impl RefUnwindSafe for PrepareError
impl Send for PrepareError
impl Sync for PrepareError
impl Unpin for PrepareError
impl UnsafeUnpin for PrepareError
impl UnwindSafe for PrepareError
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