pub enum StrictPathError {
InvalidRestriction {
restriction: PathBuf,
source: Error,
},
PathEscapesBoundary {
attempted_path: PathBuf,
restriction_boundary: PathBuf,
},
PathResolutionError {
path: PathBuf,
source: Error,
},
}Expand description
SUMMARY: Represent errors produced by boundary creation and strict/virtual path validation.
DETAILS:
This error type is returned by operations that construct PathBoundary
VirtualRoot or that compose StrictPath/VirtualPath via joins. Each
variant carries enough context for actionable diagnostics while avoiding
leaking unbounded path data into messages (we truncate long displays).
VARIANTS:
InvalidRestriction: The boundary directory is missing, not a directory, or failed I/O checks.PathEscapesBoundary: A candidate path would resolve outside the boundary.PathResolutionError: Canonicalization or resolution failed (I/O error).
Variants§
InvalidRestriction
SUMMARY: The boundary directory is invalid (missing, not a directory, or I/O error).
FIELDS:
restriction(PathBuf): The attempted boundary path.source(std::io::Error): Underlying OS error that explains why the restriction is invalid.
PathEscapesBoundary
SUMMARY: The attempted path would resolve outside the PathBoundary boundary.
FIELDS:
attempted_path(PathBuf): The user-supplied or composed candidate.restriction_boundary(PathBuf): The effective boundary root.
PathResolutionError
SUMMARY: Canonicalization/resolution failed for the given path.
FIELDS:
path(PathBuf): The path whose resolution failed.source(std::io::Error): Underlying I/O cause.
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