pub struct DirectoryWriter<'a, W: AsyncWrite + Unpin> { /* private fields */ }Expand description
A handle for finalizing a directory entry in a ZIP archive.
Obtained from ZipWriter::append_directory. Use set_mtime
and/or set_permissions to attach metadata, then call
close to finalize the entry.
Dropping without calling close leaves the archive in an inconsistent state
and poisons the parent ZipWriter.
Implementations§
Source§impl<W: AsyncWrite + Unpin> DirectoryWriter<'_, W>
impl<W: AsyncWrite + Unpin> DirectoryWriter<'_, W>
Sourcepub fn set_mtime(&mut self, mtime: SystemTime) -> &mut Self
pub fn set_mtime(&mut self, mtime: SystemTime) -> &mut Self
Set the modification time for this directory entry.
Sourcepub fn set_permissions(&mut self, mode: u32) -> &mut Self
pub fn set_permissions(&mut self, mode: u32) -> &mut Self
Set Unix file permissions for this directory entry.
Provide permission bits including setuid/setgid/sticky (e.g., 0o755).
The crate automatically adds the S_IFDIR file type bit.
Trait Implementations§
Source§impl<W: AsyncWrite + Unpin> Drop for DirectoryWriter<'_, W>
impl<W: AsyncWrite + Unpin> Drop for DirectoryWriter<'_, W>
Auto Trait Implementations§
impl<'a, W> Freeze for DirectoryWriter<'a, W>where
W: Freeze,
impl<'a, W> RefUnwindSafe for DirectoryWriter<'a, W>where
W: RefUnwindSafe,
impl<'a, W> Send for DirectoryWriter<'a, W>where
W: Send,
impl<'a, W> Sync for DirectoryWriter<'a, W>where
W: Sync,
impl<'a, W> Unpin for DirectoryWriter<'a, W>
impl<'a, W> UnsafeUnpin for DirectoryWriter<'a, W>where
W: UnsafeUnpin,
impl<'a, W> !UnwindSafe for DirectoryWriter<'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