#[non_exhaustive]pub enum ErrorKind {
Show 14 variants
Unexpected,
Unsupported,
ConfigInvalid,
NotFound,
PermissionDenied,
IsADirectory,
NotADirectory,
AlreadyExists,
RateLimited,
IsSameFile,
ConditionNotMatch,
ContentTruncated,
ContentIncomplete,
InvalidInput,
}
Expand description
ErrorKind is all kinds of Error of opendal.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Unexpected
OpenDAL don’t know what happened here, and no actions other than just returning it back. For example, s3 returns an internal service error.
Unsupported
Underlying service doesn’t support this operation.
ConfigInvalid
The config for backend is invalid.
NotFound
The given path is not found.
PermissionDenied
The given path doesn’t have enough permission for this operation
IsADirectory
The given path is a directory.
NotADirectory
The given path is not a directory.
AlreadyExists
The given path already exists thus we failed to the specified operation on it.
RateLimited
Requests that sent to this path is over the limit, please slow down.
IsSameFile
The given file paths are same.
ConditionNotMatch
The condition of this operation is not match.
The condition
itself is context based.
For example, in S3, the condition
can be:
- writing a file with If-Match header but the file’s ETag is not match (will get a 412 Precondition Failed).
- reading a file with If-None-Match header but the file’s ETag is match (will get a 304 Not Modified).
As OpenDAL cannot handle the condition not match
error, it will always return this error to users.
So users could to handle this error by themselves.
ContentTruncated
The content is truncated.
This error kind means there are more content to come but been truncated.
For examples:
- Users expected to read 1024 bytes, but service returned more bytes.
- Service expected to write 1024 bytes, but users write more bytes.
ContentIncomplete
The content is incomplete.
This error kind means expect content length is not reached.
For examples:
- Users expected to read 1024 bytes, but service returned less bytes.
- Service expected to write 1024 bytes, but users write less bytes.
InvalidInput
The input is invalid.
For example, user try to seek to a negative position
Implementations§
Trait Implementations§
source§impl PartialEq<ErrorKind> for ErrorKind
impl PartialEq<ErrorKind> for ErrorKind
impl Copy for ErrorKind
impl Eq for ErrorKind
impl StructuralEq for ErrorKind
impl StructuralPartialEq for ErrorKind
Auto Trait Implementations§
impl RefUnwindSafe for ErrorKind
impl Send for ErrorKind
impl Sync for ErrorKind
impl Unpin for ErrorKind
impl UnwindSafe for ErrorKind
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<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.