Skip to main content

ImageLoader

Trait ImageLoader 

Source
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§

Source

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.
Source§

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.
Source§

fn load( &self, flash_loader: &mut FlashLoader, session: &mut Session, file: &mut dyn ImageReader, ) -> Result<(), FileDownloadError>

Implementors§

Source§

impl ImageLoader for BinLoader

Available on crate feature builtin-formats only.
Source§

impl ImageLoader for ElfLoader

Available on crate feature builtin-formats only.
Source§

impl ImageLoader for HexLoader

Available on crate feature builtin-formats only.
Source§

impl ImageLoader for Uf2Loader

Available on crate feature builtin-formats only.