#[non_exhaustive]#[repr(i32)]pub enum ErrorStatus {
Show 16 variants
CANCELLED = 10,
UNKNOWN = 11,
INVALID_ARGUMENT = 12,
DEADLINE_EXCEEDED = 13,
NOT_FOUND = 14,
ALREADY_EXISTS = 15,
PERMISSION_DENIED = 16,
RESOURCE_EXHAUSTED = 17,
FAILED_PRECONDITION = 18,
ABORTED = 19,
OUT_OF_RANGE = 20,
UNIMPLEMENTED = 21,
INTERNAL = 22,
UNAVAILABLE = 23,
DATA_LOSS = 24,
UNAUTHENTICATED = 25,
}
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
CANCELLED = 10
UNKNOWN = 11
INVALID_ARGUMENT = 12
DEADLINE_EXCEEDED = 13
NOT_FOUND = 14
ALREADY_EXISTS = 15
PERMISSION_DENIED = 16
RESOURCE_EXHAUSTED = 17
FAILED_PRECONDITION = 18
ABORTED = 19
OUT_OF_RANGE = 20
UNIMPLEMENTED = 21
INTERNAL = 22
UNAVAILABLE = 23
DATA_LOSS = 24
UNAUTHENTICATED = 25
Implementations§
Source§impl ErrorStatus
impl ErrorStatus
pub fn maybe_client_error(self) -> bool
Sourcepub fn api_error_one_segment(
self,
s1: CodeSegment,
message: Option<impl Into<String>>,
) -> ApiError
pub fn api_error_one_segment( self, s1: CodeSegment, message: Option<impl Into<String>>, ) -> ApiError
Append 2 digits at the end of the current code in the form of a decimal literal and generate an ApiError
.
Sourcepub fn api_error_two_segment(
self,
s1: CodeSegment,
s2: CodeSegment,
message: Option<impl Into<String>>,
) -> ApiError
pub fn api_error_two_segment( self, s1: CodeSegment, s2: CodeSegment, message: Option<impl Into<String>>, ) -> ApiError
Append 2*2 digits at the end of the current code in the form of a decimal literal and generate an ApiError
.
Sourcepub fn api_error_three_segment(
self,
s1: CodeSegment,
s2: CodeSegment,
s3: CodeSegment,
message: Option<impl Into<String>>,
) -> ApiError
pub fn api_error_three_segment( self, s1: CodeSegment, s2: CodeSegment, s3: CodeSegment, message: Option<impl Into<String>>, ) -> ApiError
Append 2*3 digits at the end of the current code in the form of a decimal literal and generate an ApiError
.
Trait Implementations§
Source§impl BitOr<CodeSegment> for ErrorStatus
impl BitOr<CodeSegment> for ErrorStatus
Append two digits at the end in the form of a decimal literal.
Source§impl Clone for ErrorStatus
impl Clone for ErrorStatus
Source§fn clone(&self) -> ErrorStatus
fn clone(&self) -> ErrorStatus
Returns a copy of the value. Read more
1.0.0 · 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 ErrorStatus
impl Debug for ErrorStatus
Source§impl Display for ErrorStatus
impl Display for ErrorStatus
Source§impl From<ErrorStatus> for i32
impl From<ErrorStatus> for i32
Source§fn from(enum_value: ErrorStatus) -> Self
fn from(enum_value: ErrorStatus) -> Self
Converts to this type from the input type.
Source§impl PartialEq for ErrorStatus
impl PartialEq for ErrorStatus
Source§impl TryFrom<i32> for ErrorStatus
impl TryFrom<i32> for ErrorStatus
Source§type Error = TryFromPrimitiveError<ErrorStatus>
type Error = TryFromPrimitiveError<ErrorStatus>
The type returned in the event of a conversion error.
Source§impl TryFromPrimitive for ErrorStatus
impl TryFromPrimitive for ErrorStatus
const NAME: &'static str = "ErrorStatus"
type Primitive = i32
type Error = TryFromPrimitiveError<ErrorStatus>
fn try_from_primitive( number: Self::Primitive, ) -> Result<Self, TryFromPrimitiveError<Self>>
impl Copy for ErrorStatus
impl Eq for ErrorStatus
impl StructuralPartialEq for ErrorStatus
Auto Trait Implementations§
impl Freeze for ErrorStatus
impl RefUnwindSafe for ErrorStatus
impl Send for ErrorStatus
impl Sync for ErrorStatus
impl Unpin for ErrorStatus
impl UnwindSafe for ErrorStatus
Blanket Implementations§
Source§impl<Data> ApiSuccessResponse for Data
impl<Data> ApiSuccessResponse for Data
fn api_response<Meta>(self, meta: Option<Meta>) -> ApiResponse<Self, Meta>
fn api_response_without_meta<Meta>(self) -> ApiResponse<Self, Meta>
fn api_response_with_meta<Meta>(self, meta: Meta) -> ApiResponse<Self, Meta>
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)