#[non_exhaustive]pub struct FileOptions {
pub compression_method: CompressionMethod,
pub level: Option<i32>,
pub modified_at: Timestamp,
pub unix_mode: u32,
}Expand description
The options used when adding a file to an archive.
Setting the timestamp is not implemented yet.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.compression_method: CompressionMethodThe compression method.
level: Option<i32>The compression level.
modified_at: TimestampThe modification time of the entry.
Default value is Timestamp::UNIX_EPOCH, which means that this field is
ignored.
unix_mode: u32Unix mode for the entry. The value is masked with 0o7777, so only the
first 12 bits are used.
Implementations§
Source§impl FileOptions
impl FileOptions
Sourcepub fn compression(self, method: CompressionMethod, level: Option<i32>) -> Self
pub fn compression(self, method: CompressionMethod, level: Option<i32>) -> Self
Sets the compression method and level of the options.
Sourcepub fn modified_at(self, modified_at: Timestamp) -> Self
pub fn modified_at(self, modified_at: Timestamp) -> Self
Sets the modification time of the entry.
Trait Implementations§
Source§impl Clone for FileOptions
impl Clone for FileOptions
Source§impl Debug for FileOptions
impl Debug for FileOptions
Auto Trait Implementations§
impl Freeze for FileOptions
impl RefUnwindSafe for FileOptions
impl Send for FileOptions
impl Sync for FileOptions
impl Unpin for FileOptions
impl UnsafeUnpin for FileOptions
impl UnwindSafe for FileOptions
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