pub enum PathError {
Show 14 variants
EmptyPath,
RelativePath {
path: String,
},
DotComponent {
path: String,
},
ParentComponent {
path: String,
},
EmptyDisplayName,
DisplayNameContainsSeparator {
display_name: String,
},
ReservedDisplayName {
display_name: String,
},
DisplayNameContainsControlCharacter {
code_point: u32,
},
DisplayNameTooLong {
byte_length: usize,
},
PathTooLong {
byte_length: usize,
},
PathTooDeep {
depth: usize,
},
UnportableDisplayName {
display_name: String,
reason: &'static str,
},
UnportableDisplayNameCharacter {
display_name: String,
character: char,
},
FoldedNameKeyTooLong {
byte_length: usize,
},
}Expand description
Describes why caller-supplied path or display-name text is not admissible.
Variants§
EmptyPath
Reports an empty string where an absolute path was required.
RelativePath
Reports a path that does not begin at the namespace root.
DotComponent
Reports an explicit current-directory component, which normalization never accepts.
ParentComponent
Reports a parent-directory component, which could otherwise escape the requested path.
EmptyDisplayName
Reports an empty string where one stored path component was required.
DisplayNameContainsSeparator
Reports a display name containing the path-component separator.
ReservedDisplayName
Reports . or .., whose navigation meaning prevents storing them as names.
DisplayNameContainsControlCharacter
Reports a Unicode control character that cannot appear in a stored display name.
DisplayNameTooLong
Reports a display name exceeding the stored UTF-8 component limit.
PathTooLong
Reports a path exceeding the total canonical byte bound.
PathTooDeep
Reports a path nested deeper than the depth bound.
UnportableDisplayName
Reports a display name no portable target filesystem can hold.
Fields
UnportableDisplayNameCharacter
Reports a display name holding a character Windows reserves.
Fields
FoldedNameKeyTooLong
Reports a valid display spelling whose canonical lookup key exceeds its durable bound.
Implementations§
Trait Implementations§
impl Eq for PathError
Source§impl Error for PathError
impl Error for PathError
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()