pub struct EntryOptions {
pub mtime: Option<SystemTime>,
pub unix_mode: Option<u32>,
}Expand description
Options for a ZIP entry controlling metadata written to the local file header.
Use with start_entry_with_options() on either StreamingZipWriter or
AsyncStreamingZipWriter. Fields default to “no metadata” (zero timestamp,
no permissions).
§Example
let mut writer = StreamingZipWriter::new("output.zip")?;
let opts = EntryOptions {
mtime: Some(SystemTime::now()),
unix_mode: Some(0o644),
};
writer.start_entry_with_options("file.txt", opts)?;
writer.write_data(b"Hello")?;
writer.finish()?;Fields§
§mtime: Option<SystemTime>Last-modified time. Written as MS-DOS time/date in the local header.
If None, the timestamp fields are written as zero (no date).
unix_mode: Option<u32>Unix file permission bits (e.g. 0o644, 0o755).
Written as a Unix extra field (ID 0x7875) in the local and central headers.
If None, no Unix extra field is written.
Trait Implementations§
Source§impl Clone for EntryOptions
impl Clone for EntryOptions
Source§fn clone(&self) -> EntryOptions
fn clone(&self) -> EntryOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EntryOptions
impl Debug for EntryOptions
Source§impl Default for EntryOptions
impl Default for EntryOptions
Source§fn default() -> EntryOptions
fn default() -> EntryOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for EntryOptions
impl RefUnwindSafe for EntryOptions
impl Send for EntryOptions
impl Sync for EntryOptions
impl Unpin for EntryOptions
impl UnsafeUnpin for EntryOptions
impl UnwindSafe for EntryOptions
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