pub struct Config { /* private fields */ }
Expand description
Metadata construction configurations.
Implementations§
Source§impl Config
impl Config
Sourcepub fn block_size(&mut self, bytes: NonZero<u32>) -> &mut Self
pub fn block_size(&mut self, bytes: NonZero<u32>) -> &mut Self
Set the block size of this archive.
Default value is 16MiB.
Each BLOCK
section must have
this size (before compression) except for the last one.
§Panics
Panics if bytes
is not a power of two.
Sourcepub fn mtime_only(&mut self, yes: bool) -> &mut Self
pub fn mtime_only(&mut self, yes: bool) -> &mut Self
Only store file modification time (mtime) and ignore access (atime) or change (ctime) times.
Default value is false
.
This will cause all access and change times to be ignored, and will set a flag in metadata informing their unavailability.
Sourcepub fn time_resolution_sec(&mut self, sec: NonZero<u32>) -> &mut Self
pub fn time_resolution_sec(&mut self, sec: NonZero<u32>) -> &mut Self
Set the minimum resolution of all file times.
Default value is 1 second, which is also the minimal possible value.
A non-one resolution will cause all file times to be truncated to the max multiples of the resolution not-greater than the original value.
Sourcepub fn source_date_epoch(&mut self, timestamp: u64) -> &mut Self
pub fn source_date_epoch(&mut self, timestamp: u64) -> &mut Self
Set the SOURCE_DATE_EPOCH
which clamps all timestamps after it to it.
Sourcepub fn creator(
&mut self,
info: impl Into<Option<Cow<'static, str>>>,
) -> &mut Self
pub fn creator( &mut self, info: impl Into<Option<Cow<'static, str>>>, ) -> &mut Self
Set a custom string indicating the name and version of the creator program.
Default value is
"dwarfs-enc 0.1.0"
.
Sourcepub fn created_timestamp(&mut self, ts: impl Into<Option<u64>>) -> &mut Self
pub fn created_timestamp(&mut self, ts: impl Into<Option<u64>>) -> &mut Self
Set a timestamp indicating the archive creation time.
The value will be clamped by Config::source_date_epoch
if both are set.
Default value is None
.