pub struct ImageAssembler {
pub size: usize,
pub mirrored: bool,
pub chunks: Vec<ImageChunk>,
}
Fields§
§size: usize
§mirrored: bool
§chunks: Vec<ImageChunk>
Implementations§
Source§impl ImageAssembler
impl ImageAssembler
Sourcepub fn with_params(size: usize, mirrored: bool) -> Self
pub fn with_params(size: usize, mirrored: bool) -> Self
Creates an ImageAssembler
with a given size
and mirroring parameters.
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates an ImageAssembler
with default parameters for OpenTitan: a 1MiB image which is mirrored.
Sourcepub fn parse(&mut self, chunks: &[impl AsRef<str>]) -> Result<()>
pub fn parse(&mut self, chunks: &[impl AsRef<str>]) -> Result<()>
Parse a list of strings into chunks to be assembled.
Each string may be a filename or a filename@offset describing where in the assembled image the contents of the file should appear.
The offset is an integer expressed in any of the bases accepted by ParseInt
.
Trait Implementations§
Source§impl Debug for ImageAssembler
impl Debug for ImageAssembler
Source§impl Default for ImageAssembler
impl Default for ImageAssembler
Source§fn default() -> ImageAssembler
fn default() -> ImageAssembler
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ImageAssembler
impl RefUnwindSafe for ImageAssembler
impl Send for ImageAssembler
impl Sync for ImageAssembler
impl Unpin for ImageAssembler
impl UnwindSafe for ImageAssembler
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more