Struct android_sparse::write::Writer [−][src]
pub struct Writer { /* fields omitted */ }Writes sparse blocks to a sparse image.
Methods
impl Writer[src]
impl Writerpub fn new(file: File) -> Result<Self>[src]
pub fn new(file: File) -> Result<Self>Creates a new writer that writes to file.
The created writer skips checksum calculation in favor of
speed. To get a writer that does checksum calculation, use
Writer::with_crc instead.
pub fn with_crc(file: File) -> Result<Self>[src]
pub fn with_crc(file: File) -> Result<Self>Creates a new writer that writes to file and adds a checksum
at the end.
pub fn write_block(&mut self, block: &Block) -> Result<()>[src]
pub fn write_block(&mut self, block: &Block) -> Result<()>Writes a sparse block to this writer.
The sparse block is converted into the sparse file format and written to this decoder's destination.
pub fn close(self) -> Result<()>[src]
pub fn close(self) -> Result<()>Finishes writing the sparse image and flushes any buffered data.
Consumes the reader as using it afterward would be invalid.