pub enum PathValidationError {
PathTraversal {
path: String,
},
AbsolutePath {
path: String,
},
DepthExceeded {
path: String,
depth: usize,
max: usize,
},
NullByte {
path: String,
},
InvalidExtension {
path: String,
expected: Vec<String>,
},
SymlinkEscape {
link: String,
target: String,
},
WorkspaceEscape {
path: String,
workspace: String,
},
EmptyPath,
InvalidUtf8 {
path: String,
},
UnicodeNormalization {
path: String,
reason: String,
},
}Expand description
Path validation error types
Variants§
PathTraversal
Path contains “..” components (path traversal attempt)
AbsolutePath
Path is absolute when relative was expected
DepthExceeded
Path exceeds maximum allowed depth
NullByte
Path contains null bytes
InvalidExtension
Path has invalid extension
SymlinkEscape
Symlink points outside allowed workspace
WorkspaceEscape
Path escapes workspace root
EmptyPath
Path is empty
InvalidUtf8
Invalid UTF-8 in path
UnicodeNormalization
Unicode normalization issue
Trait Implementations§
Source§impl Clone for PathValidationError
impl Clone for PathValidationError
Source§fn clone(&self) -> PathValidationError
fn clone(&self) -> PathValidationError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 PathValidationError
impl Debug for PathValidationError
Source§impl Display for PathValidationError
impl Display for PathValidationError
impl Eq for PathValidationError
Source§impl Error for PathValidationError
impl Error for PathValidationError
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 From<PathValidationError> for Error
impl From<PathValidationError> for Error
Source§fn from(err: PathValidationError) -> Self
fn from(err: PathValidationError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for PathValidationError
impl PartialEq for PathValidationError
impl StructuralPartialEq for PathValidationError
Auto Trait Implementations§
impl Freeze for PathValidationError
impl RefUnwindSafe for PathValidationError
impl Send for PathValidationError
impl Sync for PathValidationError
impl Unpin for PathValidationError
impl UnsafeUnpin for PathValidationError
impl UnwindSafe for PathValidationError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.