pub enum Error {
Io(Error),
Serde {
context: String,
cause: Error,
},
Reqwest {
context: String,
cause: Error,
},
Metadata(Error),
GcpAuth(Error),
Panic(String),
Dropped,
AtCapacity,
Generic {
context: String,
cause: Option<Box<dyn Error + Send + Sync>>,
},
}Expand description
Error type for service operations.
Variants§
Io(Error)
IO errors related to payload streaming or file operations.
Serde
Errors related to de/serialization.
Fields
Reqwest
All errors stemming from the reqwest client, used in multiple backends to send requests to e.g. GCP APIs. These can be network errors encountered when sending the requests, but can also indicate errors returned by the API itself.
Fields
cause: ErrorThe underlying reqwest error.
Metadata(Error)
Errors related to de/serialization and parsing of object metadata.
GcpAuth(Error)
Errors encountered when attempting to authenticate with GCP.
Panic(String)
A spawned service task panicked.
Dropped
A spawned service task was dropped before it could deliver its result.
This is an unexpected condition that can occur when the runtime drops the task for unknown reasons.
AtCapacity
The service has reached its concurrency limit and cannot accept more operations.
Generic
Any other error stemming from one of the storage backends, which might be specific to that backend or to a certain operation.
Implementations§
Source§impl Error
impl Error
Sourcepub fn panic(payload: Box<dyn Any + Send>) -> Self
pub fn panic(payload: Box<dyn Any + Send>) -> Self
Creates an Error::Panic from a panic payload, extracting the message.
Sourcepub fn reqwest(context: impl Into<String>, cause: Error) -> Self
pub fn reqwest(context: impl Into<String>, cause: Error) -> Self
Creates an Error::Reqwest from a reqwest error with context.
Sourcepub fn generic(context: impl Into<String>) -> Self
pub fn generic(context: impl Into<String>) -> Self
Creates an Error::Generic with a context string and no cause.
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
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe 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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.