#[non_exhaustive]pub enum PathReason {
Show 13 variants
NotAbsolute,
EmptyComponent,
DotComponent,
DotDotComponent,
ControlCharacter,
FormatCharacter,
ForbiddenCharacter,
NotNfc,
TrailingDotOrSpace,
ReservedName,
ReservedPrefix,
NameTooLong,
PathTooLong,
}Expand description
Why a path or name was refused. Carried by NsErrorKind::InvalidPath.
Deliberately carries no part of the offending input: the input may be hostile or may be a host path, and an error message is not the place to echo it.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
NotAbsolute
The path does not start with /. Namespace paths are always absolute; a host path such as C:\x or a/b is not
one.
EmptyComponent
An empty component: //, or a trailing /.
DotComponent
A . component.
DotDotComponent
A .. component. The namespace has no parent traversal; ask for the parent’s path.
ControlCharacter
A control character (C0, DEL or C1).
FormatCharacter
An invisible or direction-changing format character (see is_format_character).
ForbiddenCharacter
One of \ : < > " | ? *.
NotNfc
The name is not in Unicode NFC. Normalise it before asking.
TrailingDotOrSpace
The name ends in . or a space.
ReservedName
A Windows reserved device name (CON, NUL, COM1, …), with or without an extension.
ReservedPrefix
The name starts with TEMP_PREFIX.
NameTooLong
A component longer than MAX_NAME_BYTES.
PathTooLong
A path longer than MAX_PATH_BYTES.
Trait Implementations§
Source§impl Clone for PathReason
impl Clone for PathReason
impl Copy for PathReason
Source§impl Debug for PathReason
impl Debug for PathReason
impl Eq for PathReason
Source§impl Hash for PathReason
impl Hash for PathReason
Source§impl PartialEq for PathReason
impl PartialEq for PathReason
impl StructuralPartialEq for PathReason
Auto Trait Implementations§
impl Forget for PathReason
impl Freeze for PathReason
impl Move for PathReason
impl RefUnwindSafe for PathReason
impl Send for PathReason
impl Sync for PathReason
impl Unpin for PathReason
impl UnsafeUnpin for PathReason
impl UnwindSafe for PathReason
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.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more