pub enum PathRejection {
Allowed,
Absolute,
Traversal,
}Expand description
Outcome of classifying a path against the “relative, no ..” policy.
Variants§
Allowed
Path is relative and contains no .. component — acceptable.
Absolute
Path is absolute, or looks absolute via a leading /.
Path::is_absolute is false on Windows for Unix-style paths like /etc/passwd
(no drive letter), so the leading-/ string check is required in addition to it.
Traversal
Path contains a .. (Component::ParentDir) component.
Trait Implementations§
Source§impl Clone for PathRejection
impl Clone for PathRejection
Source§fn clone(&self) -> PathRejection
fn clone(&self) -> PathRejection
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 moreimpl Copy for PathRejection
Source§impl Debug for PathRejection
impl Debug for PathRejection
impl Eq for PathRejection
Source§impl PartialEq for PathRejection
impl PartialEq for PathRejection
Source§fn eq(&self, other: &PathRejection) -> bool
fn eq(&self, other: &PathRejection) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for PathRejection
Auto Trait Implementations§
impl Freeze for PathRejection
impl RefUnwindSafe for PathRejection
impl Send for PathRejection
impl Sync for PathRejection
impl Unpin for PathRejection
impl UnsafeUnpin for PathRejection
impl UnwindSafe for PathRejection
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