pub trait BootMetaStore {
type Error: Debug;
// Required methods
fn boot_state(&self) -> BootState;
fn has_trials(&self) -> bool;
fn app_checksum(&self) -> u16;
fn app_size(&self) -> u32;
fn advance(&mut self) -> Result<BootState, Self::Error>;
fn consume_trial(&mut self) -> Result<(), Self::Error>;
fn refresh(
&mut self,
checksum: u16,
state: BootState,
app_size: u32,
) -> Result<(), Self::Error>;
}Expand description
Persistent boot metadata storage.
Required Associated Types§
Required Methods§
Sourcefn boot_state(&self) -> BootState
fn boot_state(&self) -> BootState
Current boot lifecycle state.
Sourcefn has_trials(&self) -> bool
fn has_trials(&self) -> bool
Returns true if any trial boots remain.
Sourcefn app_checksum(&self) -> u16
fn app_checksum(&self) -> u16
Stored CRC16 of the application firmware.
Sourcefn advance(&mut self) -> Result<BootState, Self::Error>
fn advance(&mut self) -> Result<BootState, Self::Error>
Step state down by one (1→0 bit clear).
Sourcefn consume_trial(&mut self) -> Result<(), Self::Error>
fn consume_trial(&mut self) -> Result<(), Self::Error>
Consume one trial boot (clears one bit in the trials field).