#[repr(i32)]pub enum ErrorCode {
Unknown = 0,
ConflictException = 1,
InvalidRequestException = 2,
InternalServerException = 3,
NoSuchKeyException = 4,
AuthException = 5,
}
Expand description
ErrorCodes to be used in ErrorResponse
Variants§
Unknown = 0
Default protobuf Enum value. Will not be used as ErrorCode
by server.
ConflictException = 1
Used when the request contains mismatched version (either key or global)
in PutObjectRequest
. For more info refer PutObjectRequest
.
InvalidRequestException = 2
Used in the following cases:
- The request was missing a required argument.
- The specified argument was invalid, incomplete or in the wrong format.
- The request body of api cannot be deserialized into corresponding protobuf object.
InternalServerException = 3
Used when an internal server error occurred, client is probably at no fault and can safely retry this error with exponential backoff.
NoSuchKeyException = 4
Used when the specified key
in a GetObjectRequest
does not exist.
AuthException = 5
Used when authentication fails or in case of an unauthorized request.
Implementations§
Source§impl ErrorCode
impl ErrorCode
Sourcepub fn as_str_name(&self) -> &'static str
pub fn as_str_name(&self) -> &'static str
String value of the enum field names used in the ProtoBuf definition.
The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.
Sourcepub fn from_str_name(value: &str) -> Option<Self>
pub fn from_str_name(value: &str) -> Option<Self>
Creates an enum from field names used in the ProtoBuf definition.
Trait Implementations§
Source§impl Ord for ErrorCode
impl Ord for ErrorCode
Source§impl PartialOrd for ErrorCode
impl PartialOrd for ErrorCode
impl Copy for ErrorCode
impl Eq for ErrorCode
impl StructuralPartialEq for ErrorCode
Auto Trait Implementations§
impl Freeze for ErrorCode
impl RefUnwindSafe for ErrorCode
impl Send for ErrorCode
impl Sync for ErrorCode
impl Unpin for ErrorCode
impl UnwindSafe for ErrorCode
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.