pub enum CheckedPathError {
InvalidFilename,
PathTraversalAttack,
UnexpectedPrefix,
UnexpectedRoot,
}
Expand description
An error returned when a path violates checked criteria.
Variants§
InvalidFilename
When a normal component contains invalid characters for the current encoding.
PathTraversalAttack
When a path component that represents a parent directory is provided such that the original path would be escaped to access arbitrary files.
UnexpectedPrefix
When a path component that represents a prefix is provided after the start of the path.
UnexpectedRoot
When a path component that represents a root is provided after the start of the path.
Trait Implementations§
Source§impl Clone for CheckedPathError
impl Clone for CheckedPathError
Source§fn clone(&self) -> CheckedPathError
fn clone(&self) -> CheckedPathError
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for CheckedPathError
impl Debug for CheckedPathError
Source§impl Display for CheckedPathError
impl Display for CheckedPathError
Source§impl Error for CheckedPathError
impl Error for CheckedPathError
1.30.0 · 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()
Source§impl PartialEq for CheckedPathError
impl PartialEq for CheckedPathError
impl Eq for CheckedPathError
impl StructuralPartialEq for CheckedPathError
Auto Trait Implementations§
impl Freeze for CheckedPathError
impl RefUnwindSafe for CheckedPathError
impl Send for CheckedPathError
impl Sync for CheckedPathError
impl Unpin for CheckedPathError
impl UnwindSafe for CheckedPathError
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