Skip to main content

ImageFormat

Trait ImageFormat 

Source
pub trait ImageFormat: Sync {
    // Required methods
    fn formats(&self) -> &[&str];
    fn create_loader(&self, options: Option<Value>) -> Box<dyn ImageLoader>;
}
Expand description

A trait representing a firmware image format.

This trait can create a new ImageLoader, which can be used to load firmware images for flashing.

Required Methods§

Source

fn formats(&self) -> &[&str]

The list of format names supported by this loader factory.

Source

fn create_loader(&self, options: Option<Value>) -> Box<dyn ImageLoader>

Create a new image loader.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§