#[non_exhaustive]pub enum FileError {
Name(NameProblem),
Outside,
IntoItself,
Taken(String),
CrossDevice,
Denied,
NotReadable,
Missing,
NoTrash,
NoRoom,
Stopped,
System(String),
}Expand description
Why a file operation was not done.
More reasons may be added as more operations arrive, so match with a _ arm and lean on
message for the words.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Name(NameProblem)
The name cannot be used.
Outside
The entry would be reached, or land, outside the root folder.
IntoItself
A folder was to go into itself or into a folder below it.
Taken(String)
The target folder already has an entry of this name.
CrossDevice
Moving would cross to another file system, which a rename cannot do; files are not copied.
Denied
The user may not read or change this.
NotReadable
The user may not see what is in this folder.
Missing
It is not there any more: another program took it away while the rows still showed it.
NoTrash
There is no trash this entry can go to: none on this file system, or none at all.
NoRoom
The disk is full.
Stopped
The person said to stop, and what had been written was taken away again.
System(String)
What the operating system said.
Implementations§
Trait Implementations§
impl Eq for FileError
impl StructuralPartialEq for FileError
Auto Trait Implementations§
impl Freeze for FileError
impl RefUnwindSafe for FileError
impl Send for FileError
impl Sync for FileError
impl Unpin for FileError
impl UnsafeUnpin for FileError
impl UnwindSafe for FileError
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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