pub struct ZipEntryWriter<'a, W> { /* private fields */ }Expand description
A writer for a file in a ZIP archive.
This writer is created by ZipArchiveWriter::new_file.
Data written to this writer is compressed and written to the underlying archive.
After writing all data, call finish to complete the entry.
Implementations§
Source§impl<'a, W> ZipEntryWriter<'a, W>
impl<'a, W> ZipEntryWriter<'a, W>
Sourcepub fn compressed_bytes(&self) -> u64
pub fn compressed_bytes(&self) -> u64
Returns the total number of bytes successfully written (bytes out).
Sourcepub fn stream_offset(&self) -> u64
pub fn stream_offset(&self) -> u64
Returns the current offset in the output stream.
See ZipArchiveWriter::stream_offset for more information.
Trait Implementations§
Source§impl<'a, W: Debug> Debug for ZipEntryWriter<'a, W>
impl<'a, W: Debug> Debug for ZipEntryWriter<'a, W>
Source§impl<W> Write for ZipEntryWriter<'_, W>where
W: Write,
impl<W> Write for ZipEntryWriter<'_, W>where
W: Write,
Source§fn write(&mut self, buf: &[u8]) -> Result<usize>
fn write(&mut self, buf: &[u8]) -> Result<usize>
Writes a buffer into this writer, returning how many bytes were written. Read more
Source§fn flush(&mut self) -> Result<()>
fn flush(&mut self) -> Result<()>
Flushes this output stream, ensuring that all intermediately buffered
contents reach their destination. Read more
Source§fn is_write_vectored(&self) -> bool
fn is_write_vectored(&self) -> bool
🔬This is a nightly-only experimental API. (
can_vector)1.0.0 · Source§fn write_all(&mut self, buf: &[u8]) -> Result<(), Error>
fn write_all(&mut self, buf: &[u8]) -> Result<(), Error>
Attempts to write an entire buffer into this writer. Read more
Source§fn write_all_vectored(&mut self, bufs: &mut [IoSlice<'_>]) -> Result<(), Error>
fn write_all_vectored(&mut self, bufs: &mut [IoSlice<'_>]) -> Result<(), Error>
🔬This is a nightly-only experimental API. (
write_all_vectored)Attempts to write multiple buffers into this writer. Read more
Auto Trait Implementations§
impl<'a, W> Freeze for ZipEntryWriter<'a, W>
impl<'a, W> RefUnwindSafe for ZipEntryWriter<'a, W>where
W: RefUnwindSafe,
impl<'a, W> Send for ZipEntryWriter<'a, W>where
W: Send,
impl<'a, W> Sync for ZipEntryWriter<'a, W>where
W: Sync,
impl<'a, W> Unpin for ZipEntryWriter<'a, W>
impl<'a, W> !UnwindSafe for ZipEntryWriter<'a, W>
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