pub enum StrictPathError {
InvalidRestriction {
restriction: PathBuf,
source: Error,
},
PathEscapesBoundary {
attempted_path: PathBuf,
restriction_boundary: PathBuf,
},
PathResolutionError {
path: PathBuf,
source: Error,
},
}Expand description
Errors produced by boundary creation and strict/virtual path validation.
Returned by operations that construct PathBoundary/VirtualRoot or compose
StrictPath/VirtualPath via joins. Each variant carries enough context for
actionable diagnostics while avoiding leaking unbounded path data into messages.
Variants§
InvalidRestriction
The boundary directory is invalid (missing, not a directory, or I/O error).
PathEscapesBoundary
The attempted path resolves outside the PathBoundary — a traversal attack was blocked.
PathResolutionError
Canonicalization or resolution failed for the given path.
Trait Implementations§
Source§impl Debug for StrictPathError
impl Debug for StrictPathError
Source§impl Display for StrictPathError
impl Display for StrictPathError
Source§impl Error for StrictPathError
impl Error for StrictPathError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for StrictPathError
impl !RefUnwindSafe for StrictPathError
impl Send for StrictPathError
impl Sync for StrictPathError
impl Unpin for StrictPathError
impl UnsafeUnpin for StrictPathError
impl !UnwindSafe for StrictPathError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more