pub enum Error {
Io(Error),
Client(ClientError),
Serde {
context: String,
cause: Error,
},
Reqwest {
context: String,
cause: Error,
},
Metadata(Error),
GcpAuth(Error),
Panic(String),
Dropped,
UnexpectedTombstone,
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.
Client(ClientError)
Error originating from a client-supplied input stream.
Indicates the client is at fault (e.g. dropped connection mid-upload) and should map to a 4xx response rather than a 5xx.
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.
UnexpectedTombstone
A redirect tombstone was encountered at a place where it is not supported.
This indicates a caller bug — tombstone-aware reads must go through the
HighVolumeBackend methods.
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 serde(context: impl Into<String>, cause: Error) -> Self
pub fn serde(context: impl Into<String>, cause: Error) -> Self
Creates an Error::Serde from a serde 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
Source§impl From<ClientError> for Error
impl From<ClientError> for Error
Source§fn from(source: ClientError) -> Self
fn from(source: ClientError) -> Self
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.