pub enum Error<E> where
E: Debug + Display, {
Client(E),
IO(Error),
B2(B2Error),
Format(Error),
Unauthorized(Capability),
Validation(ValidationError),
MissingAuthorization,
NoRequest,
}Expand description
Errors related to making B2 API calls.
Variants
Client(E)
An error from the underlying HTTP client.
IO(Error)
An I/O error from the local filesystem.
B2(B2Error)
An error from the Backblaze B2 API.
Format(Error)
An error deserializing the HTTP client’s response.
Unauthorized(Capability)
The Authorization lacks a required capability to perform a task. The provided capability is required.
This error is typically used when the B2 API returns null rather than
returning an error or to return what we know will be an authorization
error prior to sending a request to the API.
Validation(ValidationError)
An error validating data prior to making a Backblaze B2 API call.
MissingAuthorization
Attempted to send a request without a valid Authorization.
NoRequest
Attempted to send a non-existent request.
Trait Implementations
sourceimpl<E> Error for Error<E> where
E: Debug + Display,
impl<E> Error for Error<E> where
E: Debug + Display,
1.30.0 · sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
backtrace)Returns a stack backtrace, if available, of where this error occurred. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
sourceimpl<E> From<ValidationError> for Error<E> where
E: Debug + Display,
impl<E> From<ValidationError> for Error<E> where
E: Debug + Display,
sourcefn from(e: ValidationError) -> Self
fn from(e: ValidationError) -> Self
Performs the conversion.
Auto Trait Implementations
impl<E> !RefUnwindSafe for Error<E>
impl<E> Send for Error<E> where
E: Send,
impl<E> Sync for Error<E> where
E: Sync,
impl<E> Unpin for Error<E> where
E: Unpin,
impl<E> !UnwindSafe for Error<E>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more