#[repr(u8)]pub enum GrpcStatus {
Show 17 variants
Ok = 0,
Cancelled = 1,
Unknown = 2,
InvalidArgument = 3,
DeadlineExceeded = 4,
NotFound = 5,
AlreadyExists = 6,
PermissionDenied = 7,
ResourceExhausted = 8,
FailedPrecondition = 9,
Aborted = 10,
OutOfRange = 11,
Unimplemented = 12,
Internal = 13,
Unavailable = 14,
DataLoss = 15,
Unauthenticated = 16,
}Expand description
Canonical gRPC status codes (0..=16).
Variants§
Ok = 0
Not an error; returned on success (0).
Cancelled = 1
The operation was cancelled (1).
Unknown = 2
Unknown error (2).
InvalidArgument = 3
Client specified an invalid argument (3).
DeadlineExceeded = 4
Deadline expired before operation could complete (4).
NotFound = 5
Requested entity was not found (5).
AlreadyExists = 6
Entity attempted to be created already exists (6).
PermissionDenied = 7
Caller does not have permission (7).
ResourceExhausted = 8
Resource exhausted such as quota or message size limit (8).
FailedPrecondition = 9
System is not in a state required for execution (9).
Aborted = 10
Operation was aborted (10).
OutOfRange = 11
Operation was attempted past the valid range (11).
Unimplemented = 12
Operation is not implemented or supported (12).
Internal = 13
Internal server error (13).
Service is currently unavailable (14).
DataLoss = 15
Unrecoverable data loss or corruption (15).
Unauthenticated = 16
Request lacks valid authentication credentials (16).
Implementations§
Source§impl GrpcStatus
Inherent implementation of GrpcStatus.
impl GrpcStatus
Inherent implementation of GrpcStatus.
Sourcepub fn from_code(code: u8) -> Self
pub fn from_code(code: u8) -> Self
Converts a numeric code (0..=16) back into a GrpcStatus.
§Arguments
u8- Numeric gRPC status code.
§Returns
Self- Matching status variant, orGrpcStatus::Unknownfor unrecognised codes.
Trait Implementations§
Source§impl Clone for GrpcStatus
impl Clone for GrpcStatus
impl Copy for GrpcStatus
Source§impl Debug for GrpcStatus
impl Debug for GrpcStatus
Source§impl Default for GrpcStatus
impl Default for GrpcStatus
impl Eq for GrpcStatus
Source§impl Hash for GrpcStatus
impl Hash for GrpcStatus
Source§impl PartialEq for GrpcStatus
impl PartialEq for GrpcStatus
impl StructuralPartialEq for GrpcStatus
Auto Trait Implementations§
impl Forget for GrpcStatus
impl Freeze for GrpcStatus
impl Move for GrpcStatus
impl RefUnwindSafe for GrpcStatus
impl Send for GrpcStatus
impl Sync for GrpcStatus
impl Unpin for GrpcStatus
impl UnsafeUnpin for GrpcStatus
impl UnwindSafe for GrpcStatus
Blanket Implementations§
impl<T> AnySend for T
impl<T> AnySendClone for T
impl<T> AnySendSync for T
impl<T> AnySendSyncClone for T
impl<T> AnySync for T
impl<T> AnySyncClone for T
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> 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.