#[non_exhaustive]pub enum FileNameErrorReason {
InvalidCharacter(char),
InvalidComponent(String),
ReservedName(String),
TrailingSpaceOrPeriod(String),
TooLong {
actual: usize,
max: usize,
},
}Expand description
The reason a virtual file name or path component is invalid.
Windows-specific restrictions include reserved device names, prohibited
characters, and the UTF-16 capacity of FILEDESCRIPTORW.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
InvalidCharacter(char)
A prohibited character was found in a path component.
InvalidComponent(String)
A path component is invalid, such as an empty or traversal component.
ReservedName(String)
A path component uses a reserved Windows device name.
TrailingSpaceOrPeriod(String)
A Windows path component ends with a space or period.
TooLong
The file path exceeds the supported length in UTF-16 code units.
actual is the encoded length and max is the supported maximum.
Trait Implementations§
Source§impl Clone for FileNameErrorReason
impl Clone for FileNameErrorReason
Source§impl Debug for FileNameErrorReason
impl Debug for FileNameErrorReason
Source§impl Display for FileNameErrorReason
impl Display for FileNameErrorReason
impl Eq for FileNameErrorReason
Source§impl PartialEq for FileNameErrorReason
impl PartialEq for FileNameErrorReason
impl StructuralPartialEq for FileNameErrorReason
Auto Trait Implementations§
impl Freeze for FileNameErrorReason
impl RefUnwindSafe for FileNameErrorReason
impl Send for FileNameErrorReason
impl Sync for FileNameErrorReason
impl Unpin for FileNameErrorReason
impl UnsafeUnpin for FileNameErrorReason
impl UnwindSafe for FileNameErrorReason
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
Mutably borrows from an owned value. Read more