pub struct PreparedUpdate { /* private fields */ }Expand description
An update validated against the installed firmware, ready to write.
Implementations§
Source§impl PreparedUpdate
impl PreparedUpdate
Sourcepub fn check(image: &[u8], drive: &Identity) -> Result<Family, PrepareError>
pub fn check(image: &[u8], drive: &Identity) -> Result<Family, PrepareError>
Every check that needs no installed firmware, in order: size, integrity, raw drive read, chip against the drive and the image’s own hardware family. Returns that family.
Run it before capturing a backup; PreparedUpdate::prepare repeats
it.
Sourcepub fn prepare(
image: &[u8],
installed: &InstalledFirmware,
) -> Result<Self, PrepareError>
pub fn prepare( image: &[u8], installed: &InstalledFirmware, ) -> Result<Self, PrepareError>
Prepare image for the drive installed describes: Self::check
against its identity, then the family gate. Both families must be known
and equal.
Sourcepub fn prepare_without_installed(
image: &[u8],
live: &Identity,
) -> Result<Self, PrepareError>
pub fn prepare_without_installed( image: &[u8], live: &Identity, ) -> Result<Self, PrepareError>
Prepare after the host explicitly accepted unavailable installed bytes. Image integrity, framing, chip and target-family checks still apply. Installed-family equality is unavailable, not inferred from the target. This method does not confer backup consent or verify installed firmware.
Sourcepub fn class(&self) -> DriveClass
pub fn class(&self) -> DriveClass
The update dialect.
Sourcepub fn family(&self) -> Family
pub fn family(&self) -> Family
The target hardware family. The captured-installed preparation path also established equality with the installed family.
Sourcepub fn steps(&self) -> Vec<Step>
pub fn steps(&self) -> Vec<Step>
The commands of the update session; see DriveClass::steps.
Sourcepub fn verification_ranges(&self) -> Vec<RangeInclusive<usize>>
pub fn verification_ranges(&self) -> Vec<RangeInclusive<usize>>
The ranges read-back verification compares; see
DriveClass::verification_ranges.