#[non_exhaustive]pub enum ReadPolicy {
Strict,
Lenient,
}Expand description
The conformance-strictness policy a read applies: a threshold over Severity.
Robustness — bounds-checking, never panicking on malformed input — is unconditional and not governed by this. The policy decides only where the fatal line sits on the severity scale.
The set of policies is this crate’s choice rather than a format’s, so the enum is
#[non_exhaustive] and a match over it carries a wildcard arm;
is_fatal answers the question a match usually asks.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Strict
Fatal at Severity::Conformance and above: the read fails on anything a
conformant filesystem of that family would not carry, so what a strict read returns
is a filesystem whose every field it recognized.
Lenient
Fatal at nothing: a lenient read collects every finding as structured data and rejects no image, so a malformed image is reported rather than refused. This is the reading a whole-image scan reports under.
Implementations§
Trait Implementations§
Source§impl Clone for ReadPolicy
impl Clone for ReadPolicy
Source§fn clone(&self) -> ReadPolicy
fn clone(&self) -> ReadPolicy
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more