#[non_exhaustive]pub enum RefsError {
Truncated {
structure: &'static str,
need: usize,
have: usize,
},
BadSignature {
found: [u8; 8],
},
BadFsrs {
found: [u8; 4],
found_ascii: String,
},
BadBlockSignature {
found: [u8; 4],
found_ascii: String,
expected: &'static str,
offset: u64,
},
ObjectIdNotFound {
object_id: u64,
},
UnresolvedVirtualBlock {
block: u64,
},
UnsupportedVersion {
major: u8,
minor: u8,
},
}Expand description
Errors surfaced while parsing ReFS on-disk structures.
Every variant names the offending value so an “unknown/invalid” report hands the investigator the evidence (raw bytes / offset / version), never a bare “invalid” (the fail-loud, show-the-unrecognized-value standard).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Truncated
The buffer was too small to hold the structure being parsed.
Fields
BadSignature
The ReFS file-system signature at boot offset 3 was not
"ReFS\0\0\0\0". Carries the eight bytes actually found so the caller
can identify what the image really is (fail-loud with the offending
value).
BadFsrs
The file-system recognition-structure identifier at boot offset 16 was
not "FSRS". Carries the four bytes actually found.
Fields
BadBlockSignature
A ReFS metadata block did not carry the expected block signature
(SUPB superblock, CHKP checkpoint, MSB+ ministore).
Carries the offending four bytes and the byte offset where they were found, so the investigator sees what was there and where — never a silently-skipped block.
Fields
ObjectIdNotFound
The object table did not contain the requested object identifier.
Surfaced (rather than an empty listing) when a directory walk asks the object table for an id it does not carry — the fail-loud, show-the-value standard: the missing id is named so the investigator can tell “empty directory” from “object not found”.
UnresolvedVirtualBlock
An object’s tree-root block number is a virtual address that this phase cannot resolve to a physical location.
In ReFS v3.x the object table stores virtual block numbers; resolving them to physical offsets requires the container table (a later phase). When a lookup lands on a block outside the physically-resident region, the walk fails loud with the offending virtual block number rather than silently returning an empty result (a bootstrap/resolution failure must never be indistinguishable from a genuinely empty directory).
UnsupportedVersion
The ReFS major format version is not one this reader supports.
This reader targets ReFS v3.x (Server 2016+/Win10 1803+/Win11). A v1 volume (Server 2012 / 8.1) has a materially different on-disk layout and is deliberately rejected rather than silently misparsed. Carries the actual major/minor bytes so the investigator sees the real version (the fail-loud gate RESEARCH.md mandates: “never silently misparse”).
Trait Implementations§
impl Eq for RefsError
Source§impl Error for RefsError
impl Error for RefsError
1.30.0 · 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()