#[non_exhaustive]pub enum IoSite {
Dir,
Segment(PathBuf),
Unknown,
}Expand description
Which filesystem site an SegmentError::Io failure happened on.
Replaces the pre-v0.5.0 Option<PathBuf> on the Io variant with an
explicit enumeration: directory operations (create_dir_all, scan,
clean_tmp, dir fsync), segment-file operations (read/write/rename), and
the catch-all for ?-propagated io::Errors that have not yet been
tagged with context.
Dir carries no path: the directory is reachable via
crate::SegmentBuffer::path, so the variant just records the kind
of operation that failed. Segment carries the offending segment’s
path so an operator can quarantine, alert, or move it aside without
re-deriving it. Unknown is what ? produces before any high-value
call site upgrades the error with SegmentError::with_path or
SegmentError::with_dir.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Dir
The failure happened on the segment directory itself (create_dir_all,
scan, clean_tmp, directory fsync). The directory path is reachable
via crate::SegmentBuffer::path.
Segment(PathBuf)
The failure happened on a specific segment file. Carries the file’s path so an operator can act on it (move aside, quarantine, alert) without re-deriving it.
Unknown
The failure has no specific site attached — typically an io::Error
propagated via ? before a high-value call site has upgraded it
via SegmentError::with_path or SegmentError::with_dir.