pub struct Writer<W> { /* private fields */ }
Expand description
The archive writer.
Implementations§
source§impl<W> Writer<W>where
W: Write,
impl<W> Writer<W>where
W: Write,
sourcepub fn write_header(&mut self) -> Result<(), Error>
pub fn write_header(&mut self) -> Result<(), Error>
Write the archive header.
If the header has already been written, this is a NOP.
sourcepub fn write_file<R>(
&mut self,
file_name: &str,
file_size: u32,
file_data: R,
) -> Result<(), Error>where
R: Read,
pub fn write_file<R>(
&mut self,
file_name: &str,
file_size: u32,
file_data: R,
) -> Result<(), Error>where
R: Read,
Write a file.
An file is composed of a name (path), size, and data. This function may be retried. To retry, call this function with the same arguments. Note that if anything other than an I/O error occurs, the written bytes are likely corrupted.
Trait Implementations§
Auto Trait Implementations§
impl<W> Freeze for Writer<W>where
W: Freeze,
impl<W> RefUnwindSafe for Writer<W>where
W: RefUnwindSafe,
impl<W> Send for Writer<W>where
W: Send,
impl<W> Sync for Writer<W>where
W: Sync,
impl<W> Unpin for Writer<W>where
W: Unpin,
impl<W> UnwindSafe for Writer<W>where
W: UnwindSafe,
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