#[non_exhaustive]pub enum SafePathError {
Absolute,
ParentDir,
Prefix,
}Expand description
Error returned when a relative path escapes its expected root.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Absolute
Absolute paths are not accepted for root-relative operations.
ParentDir
Parent-directory components are not accepted for root-relative operations.
Prefix
Platform-specific path prefixes are not accepted for root-relative operations.
Trait Implementations§
Source§impl Clone for SafePathError
impl Clone for SafePathError
Source§fn clone(&self) -> SafePathError
fn clone(&self) -> SafePathError
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 SafePathError
impl Debug for SafePathError
Source§impl Display for SafePathError
impl Display for SafePathError
impl Eq for SafePathError
Source§impl Error for SafePathError
impl Error for SafePathError
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 SafePathError
impl PartialEq for SafePathError
Source§fn eq(&self, other: &SafePathError) -> bool
fn eq(&self, other: &SafePathError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for SafePathError
Auto Trait Implementations§
impl Freeze for SafePathError
impl RefUnwindSafe for SafePathError
impl Send for SafePathError
impl Sync for SafePathError
impl Unpin for SafePathError
impl UnsafeUnpin for SafePathError
impl UnwindSafe for SafePathError
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