#[non_exhaustive]pub enum Error {
Show 16 variants
NotFound,
Conflict,
PreconditionFailed,
InvalidKey {
reason: &'static str,
},
Unavailable {
message: String,
retriable: bool,
},
Auth {
message: String,
},
TooLarge {
limit: u64,
},
Protocol {
message: String,
},
Fenced {
reason: &'static str,
},
Corrupt {
message: String,
},
Io {
source: Error,
},
EncodedRange {
encoding: String,
},
UnsupportedEncoding {
encoding: String,
},
Changed,
Policy(PolicyError),
NoCredentials {
reason: &'static str,
},
}Expand description
Everything an object store can report.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
NotFound
The object does not exist (ranged reads only; get/head return None).
Conflict
A Cond::CreateOnly write found an existing object.
PreconditionFailed
A Cond::IfGeneration write found another
generation (or no object).
InvalidKey
The key or prefix is not valid (see Key::parse).
The store could not be reached or refused for a transient reason.
Auth
Authentication or authorization failed.
TooLarge
The body exceeds a configured limit.
Protocol
The store answered with something unexpected.
Fenced
A fenced publish lost to another writer (see crate::fenced).
Stop writing; re-read before publishing again.
Corrupt
Published data failed verification against the record naming it.
Io
Local I/O.
EncodedRange
A ranged read of an object stored with a content encoding: a byte
range of an encoded (compressed) stream is meaningless. Read it whole
with get, which decodes it.
UnsupportedEncoding
A content encoding this build cannot write or decode (an unknown
token, or gzip without feature gzip).
Changed
The object was replaced or deleted while a read that had to resume was in flight. Nothing from either generation is returned (two generations are never spliced); read it again.
Policy(PolicyError)
A request refused by the transport’s request policy before any byte
was sent (see http::Client::with_policy).
NoCredentials
Credential discovery found no credential it is allowed to use (for
example under token::MetadataPolicy::Forbid with no user
credentials), or an empty token was supplied. Nothing was contacted.
Implementations§
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<PolicyError> for Error
impl From<PolicyError> for Error
Source§fn from(source: PolicyError) -> Self
fn from(source: PolicyError) -> Self
Auto Trait Implementations§
impl !RefUnwindSafe for Error
impl !UnwindSafe for Error
impl Freeze for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString. Read more