Enum storm::asset::LoaderError
source · [−]#[non_exhaustive]
pub enum LoaderError {
Show 21 variants
Pending,
NotFound,
PermissionDenied,
ConnectionRefused,
ConnectionReset,
ConnectionAborted,
NotConnected,
AddrInUse,
AddrNotAvailable,
BrokenPipe,
AlreadyExists,
WouldBlock,
InvalidInput,
InvalidData,
TimedOut,
WriteZero,
Interrupted,
Unsupported,
UnexpectedEof,
OutOfMemory,
Other,
}
Expand description
A list specifying general categories of I/O error.
This list is intended to grow over time and it is not recommended to exhaustively match against it.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
Pending
This file is queued to be read.
NotFound
An entity was not found, often a file.
PermissionDenied
The operation lacked the necessary privileges to complete.
ConnectionRefused
The connection was refused by the remote server.
ConnectionReset
The connection was reset by the remote server.
ConnectionAborted
The connection was aborted (terminated) by the remote server.
NotConnected
The network operation failed because it was not connected yet.
AddrInUse
A socket address could not be bound because the address is already in use elsewhere.
AddrNotAvailable
A nonexistent interface was requested or the requested address was not local.
BrokenPipe
The operation failed because a pipe was closed.
AlreadyExists
An entity already exists, often a file.
WouldBlock
The operation needs to block to complete, but the blocking operation was requested to not occur.
InvalidInput
A parameter was incorrect.
InvalidData
Data not valid for the operation were encountered.
Unlike InvalidInput
, this typically means that the operation
parameters were valid, however the error was caused by malformed
input data.
For example, a function that reads a file into a string will error with
InvalidData
if the file’s contents are not valid UTF-8.
TimedOut
The I/O operation’s timeout expired, causing it to be canceled.
WriteZero
An error returned when an operation could not be completed because a
call to write
returned [Ok(0)
].
This typically means that an operation could only succeed if it wrote a particular number of bytes but only a smaller number of bytes could be written.
Interrupted
This operation was interrupted.
Interrupted operations can typically be retried.
Unsupported
This operation is unsupported on this platform.
This means that the operation can never succeed.
UnexpectedEof
An error returned when an operation could not be completed because an “end of file” was reached prematurely.
This typically means that an operation could only succeed if it read a particular number of bytes but only a smaller number of bytes could be read.
OutOfMemory
An operation could not be completed, because it failed to allocate enough memory.
Other
A custom error that does not fall under any other I/O error kind.
This can be used to construct your own Error
s that do not match any
ErrorKind
.
This ErrorKind
is not used by the standard library.
Errors from the standard library that do not fall under any of the I/O
error kinds cannot be match
ed on, and will only match a wildcard (_
) pattern.
New ErrorKind
s might be added in the future for some of those.
Trait Implementations
sourceimpl Clone for LoaderError
impl Clone for LoaderError
sourcefn clone(&self) -> LoaderError
fn clone(&self) -> LoaderError
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for LoaderError
impl Debug for LoaderError
sourceimpl From<ErrorKind> for LoaderError
impl From<ErrorKind> for LoaderError
sourceimpl Hash for LoaderError
impl Hash for LoaderError
sourceimpl Ord for LoaderError
impl Ord for LoaderError
sourceimpl PartialEq<LoaderError> for LoaderError
impl PartialEq<LoaderError> for LoaderError
sourceimpl PartialOrd<LoaderError> for LoaderError
impl PartialOrd<LoaderError> for LoaderError
sourcefn partial_cmp(&self, other: &LoaderError) -> Option<Ordering>
fn partial_cmp(&self, other: &LoaderError) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl Copy for LoaderError
impl Eq for LoaderError
impl StructuralEq for LoaderError
impl StructuralPartialEq for LoaderError
Auto Trait Implementations
impl RefUnwindSafe for LoaderError
impl Send for LoaderError
impl Sync for LoaderError
impl Unpin for LoaderError
impl UnwindSafe for LoaderError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more