pub enum CommonError {
Show 20 variants
ResourceNotFound,
Unauthorized,
RequiredFieldMissing,
InvalidName {
expected_format: String,
name: String,
},
InvalidNameAlternative {
expected_format: String,
alternative_expected_format: String,
name: String,
},
InvalidParent {
expected: String,
parent: String,
},
InvalidStringFormat {
expected: String,
},
InvalidId,
DuplicateId,
InvalidDisplayName,
InvalidDateTime,
InvalidEnumValue,
UnknownOneofVariant,
InvalidNumericValue,
FailedConvertValue,
NumericOutOfRange,
DuplicateValue,
AlreadyExists,
NotFound,
TypeMismatch,
}Expand description
Common error types.
Variants§
ResourceNotFound
Resource was not found.
Unauthorized access.
RequiredFieldMissing
Required field is missing.
InvalidName
Invalid name format.
InvalidNameAlternative
Invalid name with alternative format.
Fields
InvalidParent
Invalid resource parent.
InvalidStringFormat
Invalid string format.
InvalidId
Invalid ID format.
DuplicateId
Duplicate ID.
InvalidDisplayName
Invalid display name format.
InvalidDateTime
Invalid date time format.
InvalidEnumValue
Invalid enum value.
UnknownOneofVariant
Unknown oneof variant.
InvalidNumericValue
Invalid numeric value.
FailedConvertValue
Failed to convert value.
NumericOutOfRange
Numeric value out of range.
DuplicateValue
Duplicate value.
AlreadyExists
Resource already exists.
NotFound
Resource not found.
TypeMismatch
Type mismatch.
Trait Implementations§
Source§impl Clone for CommonError
impl Clone for CommonError
Source§fn clone(&self) -> CommonError
fn clone(&self) -> CommonError
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 CommonError
impl Debug for CommonError
Source§impl<'de> Deserialize<'de> for CommonError
impl<'de> Deserialize<'de> for CommonError
Source§fn 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
Source§impl Display for CommonError
impl Display for CommonError
Source§impl Error for CommonError
impl Error for CommonError
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 GenericError for CommonError
impl GenericError for CommonError
Source§impl PartialEq for CommonError
impl PartialEq for CommonError
Source§fn eq(&self, other: &CommonError) -> bool
fn eq(&self, other: &CommonError) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for CommonError
impl Serialize for CommonError
impl Eq for CommonError
impl StructuralPartialEq for CommonError
Auto Trait Implementations§
impl Freeze for CommonError
impl RefUnwindSafe for CommonError
impl Send for CommonError
impl Sync for CommonError
impl Unpin for CommonError
impl UnsafeUnpin for CommonError
impl UnwindSafe for CommonError
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> 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> RequestErrorExt for T
impl<T> RequestErrorExt for T
Source§fn wrap<F>(self, field: F) -> RequestErrorwhere
F: Display,
fn wrap<F>(self, field: F) -> RequestErrorwhere
F: Display,
Wraps error with a field.
Source§fn wrap_index(self, index: usize) -> RequestError
fn wrap_index(self, index: usize) -> RequestError
Wraps error with an index.
Source§fn wrap_key<K>(self, key: K) -> RequestErrorwhere
K: Display,
fn wrap_key<K>(self, key: K) -> RequestErrorwhere
K: Display,
Wraps error with a key.
Source§fn wrap_field_index<F>(self, field: F, index: usize) -> RequestErrorwhere
F: Display,
fn wrap_field_index<F>(self, field: F, index: usize) -> RequestErrorwhere
F: Display,
Wraps error with a field and index.
Source§fn wrap_field_key<F, K>(self, field: F, key: K) -> RequestError
fn wrap_field_key<F, K>(self, field: F, key: K) -> RequestError
Wraps error with a field and key.
Source§fn wrap_request<N>(self, name: N) -> RequestErrorwhere
N: Display,
fn wrap_request<N>(self, name: N) -> RequestErrorwhere
N: Display,
Wraps error for a request.
Source§impl<T, U> RequestParseInto<U> for Twhere
U: RequestParse<T>,
impl<T, U> RequestParseInto<U> for Twhere
U: RequestParse<T>,
Source§fn parse_into(self) -> Result<U, RequestError>
fn parse_into(self) -> Result<U, RequestError>
Parses self into another type. Read more