pub enum DshApiError {
BadRequest {
message: Option<String>,
},
Configuration {
message: String,
},
Conversion {
message: String,
},
NotAuthorized {
message: Option<String>,
},
NotFound {
message: Option<String>,
},
Parameter {
message: String,
},
Unexpected {
message: String,
cause: Option<String>,
},
Unprocessable {
message: Option<String>,
},
}Expand description
Describes an API error.
Variants§
BadRequest
DSH Api server indicated that the request was not correct (BAD_REQUEST).
Configuration
Misconfiguration error, e.g. a missing environment variable.
Conversion
Conversion error, e.g. an unknown attribute.
NotAuthorized
Not authorized for the requested operation or resource.
NotFound
Requested resource does not exist.
Parameter
Wrong parameters provided.
Unexpected
Unexpected error occurred.
Unprocessable
DSH Api server indicated that the request could not be processed (UNPROCESSABLE_ENTITY).
Trait Implementations§
Source§impl Clone for DshApiError
impl Clone for DshApiError
Source§fn clone(&self) -> DshApiError
fn clone(&self) -> DshApiError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DshApiError
impl Debug for DshApiError
Source§impl Display for DshApiError
impl Display for DshApiError
Source§impl Error for DshApiError
impl Error for DshApiError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<&str> for DshApiError
impl From<&str> for DshApiError
Source§impl From<ConversionError> for DshApiError
impl From<ConversionError> for DshApiError
Source§fn from(conversion_error: ConversionError) -> Self
fn from(conversion_error: ConversionError) -> Self
Converts to this type from the input type.
Source§impl From<DshApiError> for String
impl From<DshApiError> for String
Source§fn from(value: DshApiError) -> Self
fn from(value: DshApiError) -> Self
Converts to this type from the input type.
Source§impl From<Error> for DshApiError
impl From<Error> for DshApiError
Source§impl From<Error> for DshApiError
impl From<Error> for DshApiError
Source§impl From<InvalidHeaderValue> for DshApiError
impl From<InvalidHeaderValue> for DshApiError
Source§fn from(invalid_header_error: InvalidHeaderValue) -> Self
fn from(invalid_header_error: InvalidHeaderValue) -> Self
Converts to this type from the input type.
Source§impl<T> From<PoisonError<T>> for DshApiError
impl<T> From<PoisonError<T>> for DshApiError
Source§fn from(poison_value: PoisonError<T>) -> Self
fn from(poison_value: PoisonError<T>) -> Self
Converts to this type from the input type.
Source§impl From<String> for DshApiError
impl From<String> for DshApiError
Source§impl From<SystemTimeError> for DshApiError
impl From<SystemTimeError> for DshApiError
Source§fn from(system_time_error: SystemTimeError) -> Self
fn from(system_time_error: SystemTimeError) -> Self
Converts to this type from the input type.
Source§impl From<Utf8Error> for DshApiError
impl From<Utf8Error> for DshApiError
Source§impl PartialEq for DshApiError
impl PartialEq for DshApiError
Source§fn eq(&self, other: &DshApiError) -> bool
fn eq(&self, other: &DshApiError) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for DshApiError
impl Serialize for DshApiError
impl StructuralPartialEq for DshApiError
Auto Trait Implementations§
impl Freeze for DshApiError
impl RefUnwindSafe for DshApiError
impl Send for DshApiError
impl Sync for DshApiError
impl Unpin for DshApiError
impl UnsafeUnpin for DshApiError
impl UnwindSafe for DshApiError
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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 moreSource§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> Serialize for T
impl<T> Serialize for T
fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<(), Error>
fn do_erased_serialize( &self, serializer: &mut dyn Serializer, ) -> Result<(), ErrorImpl>
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.