Expand description
Type-state pipeline that canonicalizes and boundary-checks paths.
PathHistory<S> is a newtype over PathBuf whose phantom type parameter S
records which validation stages have been applied. The compiler rejects use of a
partially-validated path where a fully-validated one is required, making it
impossible to skip a stage accidentally. The states flow:
Raw → Canonicalized → BoundaryChecked (strict) or
Raw → (Virtualized) → Canonicalized → BoundaryChecked (virtual).
This module is internal; callers interact through PathBoundary and VirtualRoot.
Structs§
- Boundary
Checked - Proven to reside within the boundary — ready for
StrictPathconstruction. - Canonicalized
- Fully canonicalized —
.,.., and symlinks resolved to real targets. - Exists
- Canonicalized path confirmed to exist as a directory (used for boundary roots).
- Path
History - Type-state wrapper over
PathBufrecording which validation stages have been applied. - Raw
- Unvalidated state — constructed from any
AsRef<Path>input. - Virtualized
- Pre-canonicalization: components clamped in virtual space so
..cannot walk above the virtual root.