#[non_exhaustive]pub struct CreationConfigFields {
pub follow_symlinks: bool,
pub include_hidden: bool,
pub max_file_size: Option<u64>,
pub exclude_patterns: Vec<String>,
pub strip_prefix: Option<PathBuf>,
pub compression_level: Option<u8>,
pub preserve_permissions: bool,
pub format: Option<ArchiveType>,
}Expand description
The field data of a CreationConfig, reachable via Deref/DerefMut
regardless of (or gated by) validation state.
Mirrors SecurityConfigFields: a
plain #[non_exhaustive] data bag that blocks external struct-literal
forging, while CreationConfig’s own private fields member blocks
re-wrapping a mutated bag into a Validated config. See that type’s docs
for the full rationale — the same sealing boundary applies here.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.follow_symlinks: boolFollow symlinks when adding files to archive.
Default: false (store symlinks as symlinks).
Security note: Following symlinks may include unintended files from outside the source directory.
Include hidden files (files starting with ‘.’).
Default: false (skip hidden files).
max_file_size: Option<u64>Maximum size for a single file in bytes.
Files larger than this limit will be skipped.
None means no limit.
Default: None.
exclude_patterns: Vec<String>Patterns to exclude from the archive.
Files matching these patterns will be skipped.
Default: [".git", ".DS_Store", "*.tmp"].
strip_prefix: Option<PathBuf>Prefix to strip from entry paths in the archive.
If set, this prefix will be removed from all entry paths. Useful for creating archives without deep directory nesting.
Default: None.
compression_level: Option<u8>Compression level (1-9).
Higher values provide better compression but slower speed.
None uses format-specific defaults.
Default: Some(6) (balanced).
Valid range: 1 (fastest) to 9 (best compression).
preserve_permissions: boolPreserve file permissions in the archive.
Default: true.
format: Option<ArchiveType>Archive format to create.
None means auto-detect from output file extension.
Default: None.
Trait Implementations§
Source§impl Clone for CreationConfigFields
impl Clone for CreationConfigFields
Source§fn clone(&self) -> CreationConfigFields
fn clone(&self) -> CreationConfigFields
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more