pub trait PersistenceBackend {
// Required methods
fn store_bootloader(&mut self, data: &[u8]) -> Result<(), PeError>;
fn retrieve_bootloader(&mut self) -> Result<Vec<u8>, PeError>;
fn is_persisted(&mut self) -> Result<bool, PeError>;
fn name(&self) -> &str;
}Expand description
Trait for persistence backends
Different backends store the bootloader image in different ways. The trait provides a unified interface for multi-layer persistence.
Required Methods§
Sourcefn retrieve_bootloader(&mut self) -> Result<Vec<u8>, PeError>
fn retrieve_bootloader(&mut self) -> Result<Vec<u8>, PeError>
Retrieve bootloader image (for verification)
Sourcefn is_persisted(&mut self) -> Result<bool, PeError>
fn is_persisted(&mut self) -> Result<bool, PeError>
Check if bootloader is already persisted