pub struct SparseImageBuilder { /* private fields */ }
Expand description
Builds sparse image files from a set of input DataSources.
Implementations§
Source§impl SparseImageBuilder
impl SparseImageBuilder
pub fn new() -> Self
pub fn set_block_size(self, block_size: u32) -> Self
Sourcepub fn add_source(self, source: DataSource) -> Self
pub fn add_source(self, source: DataSource) -> Self
Adds the given data source
to the image. source
may be encoded as one or more chunks.
Sourcepub fn built_size(&self) -> u64
pub fn built_size(&self) -> u64
Calculates total amount of space required to build the sparse image given the current set of data sources.
pub fn build<W: Write + Seek>(self, output: &mut W) -> Result<()>
pub fn build_vmo(self) -> Result<Vmo>
Auto Trait Implementations§
impl Freeze for SparseImageBuilder
impl !RefUnwindSafe for SparseImageBuilder
impl !Send for SparseImageBuilder
impl !Sync for SparseImageBuilder
impl Unpin for SparseImageBuilder
impl !UnwindSafe for SparseImageBuilder
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