#[non_exhaustive]pub enum PathComponentError {
Show 17 variants
Empty,
Dot,
DotDot,
DotGit,
ContainsSlash,
ContainsNul,
HfsDotGit,
NtfsDotGit,
NtfsBackslash,
NtfsDriveOrStream,
NtfsIllegalCharacter,
NtfsTrailingSpaceOrPeriod,
NtfsReservedDeviceName,
SymlinkedDotGitmodules,
SymlinkedDotGitattributes,
SymlinkedDotGitignore,
SymlinkedDotMailmap,
}Expand description
Why a single path component fails validation.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Empty
Zero-length component.
Dot
Component is exactly ..
DotDot
Component is exactly ...
DotGit
Component names .git (ASCII case rules) or git~1.
ContainsSlash
A / appears inside one component (tree entries must be single segments).
ContainsNul
A NUL byte appears in the component.
HfsDotGit
HFS+ ignorable code points spell .git or a protected dot-file.
NtfsDotGit
NTFS trailing space/dot, short name, or stream spelling for .git.
NtfsBackslash
Backslash introduces an NTFS .git segment in the component.
NtfsDriveOrStream
DOS drive prefix or NTFS alternate-data-stream syntax in the component.
NtfsIllegalCharacter
Character forbidden on NTFS (:*?"<>| or a control character).
NtfsTrailingSpaceOrPeriod
Trailing space or period on a component (except . and ..).
NtfsReservedDeviceName
DOS device name (CON, AUX, COM1, …) in the component.
SymlinkedDotGitmodules
Symlink whose name matches .gitmodules (HFS or NTFS spelling).
SymlinkedDotGitattributes
Symlink whose name matches .gitattributes (HFS or NTFS spelling).
SymlinkedDotGitignore
Symlink whose name matches .gitignore (HFS or NTFS spelling).
SymlinkedDotMailmap
Symlink whose name matches .mailmap (HFS or NTFS spelling).
Trait Implementations§
Source§impl Clone for PathComponentError
impl Clone for PathComponentError
impl Copy for PathComponentError
Source§impl Debug for PathComponentError
impl Debug for PathComponentError
Source§impl Display for PathComponentError
impl Display for PathComponentError
impl Eq for PathComponentError
Source§impl Error for PathComponentError
impl Error for PathComponentError
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 PathComponentError
impl PartialEq for PathComponentError
impl StructuralPartialEq for PathComponentError
Auto Trait Implementations§
impl Freeze for PathComponentError
impl RefUnwindSafe for PathComponentError
impl Send for PathComponentError
impl Sync for PathComponentError
impl Unpin for PathComponentError
impl UnsafeUnpin for PathComponentError
impl UnwindSafe for PathComponentError
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§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.