pub enum ErrorKind {
Empty,
CurrentDirectoryMarker,
ParentDirectoryMarker,
ContainsForwardSlash,
ContainsNullByte,
ContainsControlCharacter,
ContainsBom,
InvalidUtf8,
ContainsUnassignedChar,
GetFileSystemRepresentationError,
}Expand description
The kind of error that occurred during path element normalization or validation.
See Error for the full error type, which also carries the original input string.
Variants§
Empty
The name is empty (or becomes empty after whitespace trimming).
CurrentDirectoryMarker
The name is ., the current directory marker.
ParentDirectoryMarker
The name is .., the parent directory marker.
ContainsForwardSlash
The name contains a forward slash (/), which is a path separator.
ContainsNullByte
The name contains a null byte (\0), which all OSes treat as a string
terminator, silently truncating the name.
ContainsControlCharacter
The name contains a character with the Unicode Control general category,
excluding null which has its own variant.
ContainsBom
The name contains a BOM (U+FEFF).
InvalidUtf8
The byte input is not valid UTF-8.
ContainsUnassignedChar
The name contains a Unicode code point that is not assigned in the version of Unicode used by this crate.
GetFileSystemRepresentationError
Apple’s CFStringGetFileSystemRepresentation failed.
This should never occur in practice, since validation runs before this.