#[non_exhaustive]pub enum ConfigSetting {
Show 28 variants
MaxFileSize,
MaxTotalSize,
MaxFileCount,
MaxPathDepth,
MaxCompressionRatio,
MaxSolidCompressionRatio,
MaxSolidBlockMemory,
MaxTarMetadataBytes,
MaxDecoderMemory,
DecompressionBudget,
AllowedExtension,
BannedPathComponent,
OutputPath,
SourcePaths,
StripPrefix,
CreationFormat,
AtomicExtraction,
ZipOutputWriter,
MaxBytes,
ParallelDecodeMemory,
ExcludePattern,
ZipConsistency,
PathModel,
ArchiveFormat,
DecodeReuse,
DecodeReuseLimit,
SkipKind,
Durability,
}Expand description
A configuration value or required input that was refused.
as_str is the stable snake_case identifier shared by the Python, Node
and CLI front ends; label is the noun used in messages.
§Examples
use exarch_core::ConfigSetting;
assert_eq!(ConfigSetting::MaxFileSize.as_str(), "max_file_size");
assert_eq!(ConfigSetting::AllowedExtension.label(), "allowed extension");Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
MaxFileSize
SecurityConfig::max_file_size.
MaxTotalSize
SecurityConfig::max_total_size.
MaxFileCount
SecurityConfig::max_file_count.
MaxPathDepth
SecurityConfig::max_path_depth.
MaxCompressionRatio
SecurityConfig::max_compression_ratio.
MaxSolidCompressionRatio
SecurityConfig::max_solid_compression_ratio.
MaxSolidBlockMemory
SecurityConfig::max_solid_block_memory.
MaxTarMetadataBytes
SecurityConfig::max_tar_metadata_bytes.
MaxDecoderMemory
SecurityConfig::max_decoder_memory.
DecompressionBudget
The decompression budget of an integrity check.
AllowedExtension
An entry of the extension allowlist.
BannedPathComponent
An entry of the banned path component list.
OutputPath
The path of the archive to create.
SourcePaths
The paths to add to an archive.
StripPrefix
The prefix stripped from entry names.
CreationFormat
The archive format to create.
AtomicExtraction
Atomic extraction.
ZipOutputWriter
The writer a ZIP archive is created into.
MaxBytes
The byte cap of an in-memory extraction.
ParallelDecodeMemory
SecurityConfig::parallel_decode, the lookahead memory of parallel
7z decoding.
ExcludePattern
An entry of the creation exclude patterns.
ZipConsistency
The ZIP structure policy.
PathModel
The path model of a sink extraction.
ArchiveFormat
The archive format of an extraction or listing.
DecodeReuse
The decode reuse mode of an extraction.
DecodeReuseLimit
The byte limit of a decode reuse mode.
SkipKind
The kind of an entry skip.
Durability
The durability of a created archive file.
Implementations§
Source§impl ConfigSetting
impl ConfigSetting
Source§impl ConfigSetting
impl ConfigSetting
Sourcepub fn describe(self, problem: &ConfigProblem) -> String
pub fn describe(self, problem: &ConfigProblem) -> String
The message of a refused configuration: "{label} {problem}", or
"no {label} provided" for a list that came up empty.
§Examples
use exarch_core::ConfigProblem;
use exarch_core::ConfigSetting;
let text = ConfigSetting::MaxFileSize.describe(&ConfigProblem::Zero);
assert_eq!(text, "max_file_size must not be zero");Trait Implementations§
Source§impl Clone for ConfigSetting
impl Clone for ConfigSetting
Source§impl ClosedEnum for ConfigSetting
impl ClosedEnum for ConfigSetting
impl Copy for ConfigSetting
Source§impl Debug for ConfigSetting
impl Debug for ConfigSetting
Source§impl Display for ConfigSetting
impl Display for ConfigSetting
impl Eq for ConfigSetting
Source§impl Hash for ConfigSetting
impl Hash for ConfigSetting
Source§impl PartialEq for ConfigSetting
impl PartialEq for ConfigSetting
impl StructuralPartialEq for ConfigSetting
Auto Trait Implementations§
impl Freeze for ConfigSetting
impl RefUnwindSafe for ConfigSetting
impl Send for ConfigSetting
impl Sync for ConfigSetting
impl Unpin for ConfigSetting
impl UnsafeUnpin for ConfigSetting
impl UnwindSafe for ConfigSetting
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.