pub enum PathSafetyError {
Empty,
NotRelative,
Traversal,
Separator,
IllegalCharacter(char),
ReservedName,
TrailingDotOrSpace,
TooLong,
}Expand description
Why a ceremony-supplied name or path was rejected as unsafe.
Variants§
Empty
The value was empty.
NotRelative
The value was absolute, or carried a root / drive prefix, where a relative path was required.
Traversal
The value escaped its intended root via one or more .. components.
Separator
A value that had to be a single path component contained a directory
separator (/ or \).
IllegalCharacter(char)
The name contained a character that is not portable in filenames
(one of : ? * " > < |, or a control character).
ReservedName
The name is reserved by Windows for a device (CON, NUL, COM1, …),
with or without an extension.
TrailingDotOrSpace
The name ends with a . or a space, which Windows strips on creation —
key. and key would silently alias the same file.
TooLong
The name exceeds 255 bytes, the common filesystem limit for a single path component.
Trait Implementations§
Source§impl Clone for PathSafetyError
impl Clone for PathSafetyError
Source§fn clone(&self) -> PathSafetyError
fn clone(&self) -> PathSafetyError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PathSafetyError
impl Debug for PathSafetyError
Source§impl Display for PathSafetyError
impl Display for PathSafetyError
impl Eq for PathSafetyError
Source§impl Error for PathSafetyError
impl Error for PathSafetyError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl PartialEq for PathSafetyError
impl PartialEq for PathSafetyError
impl StructuralPartialEq for PathSafetyError
Auto Trait Implementations§
impl Freeze for PathSafetyError
impl RefUnwindSafe for PathSafetyError
impl Send for PathSafetyError
impl Sync for PathSafetyError
impl Unpin for PathSafetyError
impl UnsafeUnpin for PathSafetyError
impl UnwindSafe for PathSafetyError
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
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.