#[non_exhaustive]pub enum ObjectStoreError {
NotFound {
object_key: String,
},
InvalidKey {
object_key: String,
message: String,
},
InvalidContentRef(String),
InvalidRange {
object_key: String,
},
PreconditionFailed {
object_key: String,
},
PermissionDenied {
object_key: String,
message: String,
},
Unsupported(&'static str),
Configuration(String),
Transport {
object_key: String,
message: String,
},
}Expand description
Failure of one object-store operation.
Every object-scoped variant names the object it is about via object_key
(for list operations, the listed prefix). The exceptions are deliberate:
InvalidContentRef fails before a key exists, Unsupported is about a
store capability, and Configuration is about store construction.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
NotFound
Reports a required object that was absent, distinct from optional-read None.
InvalidKey
Reports a logical key that is empty, escaping, malformed, or otherwise outside its scope.
Fields
InvalidContentRef(String)
Not object-scoped: the content ref never resolved to an object key.
InvalidRange
Reports a byte range whose bounds cannot select a valid position in the object.
PreconditionFailed
Reports a create-if-absent or compare-and-swap condition that did not hold.
PermissionDenied
The provider rejected the caller’s identity or authorization — wrong, expired, or insufficient credentials. Configuration-shaped and never transient: retrying cannot help, an operator can.
Fields
Unsupported(&'static str)
Not object-scoped: the store lacks a required capability.
Configuration(String)
Not object-scoped: store construction or configuration failed before any object was addressed.
Transport
Reports an IO, timeout, protocol, or provider failure with ambiguous completion.
Implementations§
Source§impl ObjectStoreError
impl ObjectStoreError
Sourcepub fn transport(
object_key: impl Into<String>,
message: impl Into<String>,
) -> Self
pub fn transport( object_key: impl Into<String>, message: impl Into<String>, ) -> Self
Builds a ObjectStoreError::Transport for an operation on object_key.
Sourcepub fn object_key(&self) -> Option<&str>
pub fn object_key(&self) -> Option<&str>
Key of the object (or listed prefix) the failing operation targeted, when the failure is object-scoped.
Trait Implementations§
Source§impl Debug for ObjectStoreError
impl Debug for ObjectStoreError
Source§impl Display for ObjectStoreError
impl Display for ObjectStoreError
Source§impl Error for ObjectStoreError
impl Error for ObjectStoreError
1.30.0 · 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()
Auto Trait Implementations§
impl Freeze for ObjectStoreError
impl RefUnwindSafe for ObjectStoreError
impl Send for ObjectStoreError
impl Sync for ObjectStoreError
impl Unpin for ObjectStoreError
impl UnsafeUnpin for ObjectStoreError
impl UnwindSafe for ObjectStoreError
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> 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