pub trait ImageLoader {
// Required method
fn load(
&self,
flash_loader: &mut FlashLoader,
session: &mut Session,
file: &mut dyn ImageReader,
) -> Result<(), FileDownloadError>;
}Expand description
Load and parse a firmware in a particular format, and add it to the flash loader.
Based on the image loader, probe-rs may apply certain transformations to the firmware.
Required Methods§
Sourcefn load(
&self,
flash_loader: &mut FlashLoader,
session: &mut Session,
file: &mut dyn ImageReader,
) -> Result<(), FileDownloadError>
fn load( &self, flash_loader: &mut FlashLoader, session: &mut Session, file: &mut dyn ImageReader, ) -> Result<(), FileDownloadError>
Loads the given image.
Trait Implementations§
Source§impl ImageLoader for Box<dyn ImageLoader>
Available on crate feature builtin-formats only.
impl ImageLoader for Box<dyn ImageLoader>
Available on crate feature
builtin-formats only.Source§fn load(
&self,
flash_loader: &mut FlashLoader,
session: &mut Session,
file: &mut dyn ImageReader,
) -> Result<(), FileDownloadError>
fn load( &self, flash_loader: &mut FlashLoader, session: &mut Session, file: &mut dyn ImageReader, ) -> Result<(), FileDownloadError>
Loads the given image.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl ImageLoader for Box<dyn ImageLoader>
Available on crate feature builtin-formats only.
impl ImageLoader for Box<dyn ImageLoader>
Available on crate feature
builtin-formats only.fn load( &self, flash_loader: &mut FlashLoader, session: &mut Session, file: &mut dyn ImageReader, ) -> Result<(), FileDownloadError>
Implementors§
impl ImageLoader for BinLoader
Available on crate feature
builtin-formats only.impl ImageLoader for ElfLoader
Available on crate feature
builtin-formats only.impl ImageLoader for HexLoader
Available on crate feature
builtin-formats only.impl ImageLoader for Uf2Loader
Available on crate feature
builtin-formats only.