#[non_exhaustive]pub enum VfsError {
Io {
op: &'static str,
source: Error,
},
Decode {
layer: &'static str,
offset: u64,
detail: String,
bytes: SmallHex,
},
Unrecognized {
at: &'static str,
offset: u64,
bytes: SmallHex,
},
Ambiguous {
candidates: Vec<&'static str>,
},
Bootstrap {
stage: &'static str,
detail: String,
},
Unsupported {
layer: &'static str,
scheme: String,
},
Budget {
cap: &'static str,
limit: u64,
},
NeedCredentials {
scheme: &'static str,
target: String,
},
OutOfRange {
what: &'static str,
offset: u64,
len: u64,
bound: u64,
},
}Expand description
Every fallible operation in the VFS returns this. #[non_exhaustive] so a new
variant is an additive, non-breaking change.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Io
An OS/backing read failed. op names the operation for triage.
Decode
A prober said Yes/Maybe for this layer, then open failed to validate
it. LOUD — never a silent downgrade to raw. Carries the offending bytes.
Unrecognized
No prober recognized this source. The node is a typed Unknown leaf; the
sniffed bytes are attached so an analyst can identify it by hand.
Ambiguous
More than one prober returned Yes and auto_pick was off. The analyst
disambiguates rather than the engine guessing.
Bootstrap
A prerequisite every downstream step depends on failed. ALWAYS loud; never absorbed into an empty result.
Unsupported
A required decoder is not compiled in (should not happen — batteries included). Loud, names the capability.
Budget
A depth/source/byte cap tripped — a container/zip bomb, not a stack overflow or OOM.
NeedCredentials
A encryption layer needs credentials that were not supplied.
OutOfRange
An offset/length read past the addressable bound. Returned instead of a panic by the bounded readers.
Trait Implementations§
Source§impl Error for VfsError
impl Error for VfsError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()