pub enum Error {
ObjectNotFound {
message: String,
},
ObjectAlreadyExists {
message: String,
},
InvalidRequest {
message: String,
},
Unauthenticated {
internal_message: String,
},
InvalidValue {
message: String,
},
Forbidden,
InternalError {
internal_message: String,
},
ServiceUnavailable {
internal_message: String,
},
MethodNotAllowed {
internal_message: String,
},
}Variants
ObjectNotFound
Fields
message: StringAn object needed as part of this operation was not found.
ObjectAlreadyExists
Fields
message: StringAn object already exists with the specified name or identifier.
InvalidRequest
Fields
message: StringThe request was well-formed, but the operation cannot be completed given the current state of the system.
Unauthenticated
Fields
internal_message: StringAuthentication credentials were required but either missing or invalid. The HTTP status code is called “Unauthorized”, but it’s more accurate to call it “Unauthenticated”.
InvalidValue
Fields
message: StringThe specified input field is not valid.
Forbidden
The request is not authorized to perform the requested operation.
InternalError
Fields
internal_message: StringThe system encountered an unhandled operational error.
ServiceUnavailable
The system (or part of it) is unavailable.
MethodNotAllowed
Fields
internal_message: StringMethod Not Allowed
Implementations
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Error
impl<'de> Deserialize<'de> for Error
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl Error for Error
impl Error for Error
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 From<ErrorResponse> for Error
impl From<ErrorResponse> for Error
sourcefn from(error: ErrorResponse) -> Error
fn from(error: ErrorResponse) -> Error
Converts an Error error into an HttpError. This defines how
errors that are represented internally using Error are ultimately
exposed to clients over HTTP.
impl StructuralPartialEq for Error
Auto Trait Implementations
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnwindSafe for Error
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
type Err = Infallible
fn into_result(self) -> Result<T, <T as IntoResult<T>>::Err>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more