#[non_exhaustive]pub enum FileError {
NotFound,
PermissionDenied,
ReadOnly,
NotAFolder,
IsAFolder,
TooLarge {
len: u64,
limit: u64,
},
Unavailable(String),
Io(String),
}Expand description
Why an operation on a PickedFile did not happen.
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.
NotFound
The file is not there any more, or, in a browser, its handle was let go of or belongs to a page that has since been reloaded.
PermissionDenied
The platform or the user refused access.
ReadOnly
The file can only be read: an upload, or one the platform will not let this run write.
NotAFolder
A listing or a child was asked of a file.
IsAFolder
A read or a write was asked of a folder.
TooLarge
The file is longer than one read may carry. Nothing was read. len is its length when
it is known, and limit + 1 when all that is known is that it is longer.
This run has no way to do it. The reason is in the text.
Io(String)
Any other failure, as the platform described it.
Trait Implementations§
impl Eq for FileError
Source§impl Error for FileError
impl Error for FileError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
impl StructuralPartialEq for FileError
Auto Trait Implementations§
impl Forget for FileError
impl Freeze for FileError
impl Move 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
Mutably borrows from an owned value. Read more