Enum tonic::Code [−][src]
pub enum Code {}Show variants
Ok, Cancelled, Unknown, InvalidArgument, DeadlineExceeded, NotFound, AlreadyExists, PermissionDenied, ResourceExhausted, FailedPrecondition, Aborted, OutOfRange, Unimplemented, Internal, Unavailable, DataLoss, Unauthenticated, // some variants omitted
gRPC status codes used by Status
.
These variants match the gRPC status codes.
Variants
The operation completed successfully.
The operation was cancelled.
Unknown error.
Client specified an invalid argument.
Deadline expired before operation could complete.
Some requested entity was not found.
Some entity that we attempted to create already exists.
The caller does not have permission to execute the specified operation.
Some resource has been exhausted.
The system is not in a state required for the operation’s execution.
The operation was aborted.
Operation was attempted past the valid range.
Operation is not implemented or not supported.
Internal error.
The service is currently unavailable.
Unrecoverable data loss or corruption.
The request does not have valid authentication credentials
Implementations
impl Code
[src]
impl Code
[src]pub fn description(&self) -> &'static str
[src]
Get description of this Code
.
fn make_grpc_request() -> tonic::Code { // ... tonic::Code::Ok } let code = make_grpc_request(); println!("Operation completed. Human readable description: {}", code.description());
If you only need description in println
, format
, log
and other
formatting contexts, you may want to use Display
impl for Code
instead.
impl Code
[src]
impl Code
[src]pub fn from_i32(i: i32) -> Code
[src]
Get the Code
that represents the integer, if known.
If not known, returns Code::Unknown
(surprise!).
pub fn from_bytes(bytes: &[u8]) -> Code
[src]
Convert the string representation of a Code
(as stored, for example, in the grpc-status
header in a response) into a Code
. Returns Code::Unknown
if the code string is not a
valid gRPC status code.
Trait Implementations
impl StructuralEq for Code
[src]
impl StructuralEq for Code
[src]impl StructuralPartialEq for Code
[src]
impl StructuralPartialEq for Code
[src]Auto Trait Implementations
impl RefUnwindSafe for Code
impl RefUnwindSafe for Code
impl UnwindSafe for Code
impl UnwindSafe for Code
Blanket Implementations
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]pub fn equivalent(&self, key: &K) -> bool
[src]
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]pub fn instrument(self, span: Span) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>
impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
[src]
Notable traits for Instrumented<T>
impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
pub fn in_current_span(self) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>
impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
[src]
Notable traits for Instrumented<T>
impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]pub fn instrument(self, span: Span) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>
impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
[src]
Notable traits for Instrumented<T>
impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
pub fn in_current_span(self) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>
impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
[src]
Notable traits for Instrumented<T>
impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
pub fn vzip(self) -> V
impl<T> WithSubscriber for T
[src]
impl<T> WithSubscriber for T
[src]pub fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>
impl<T> Future for WithDispatch<T> where
T: Future, type Output = <T as Future>::Output;
where
S: Into<Dispatch>,
[src]
Notable traits for WithDispatch<T>
impl<T> Future for WithDispatch<T> where
T: Future, type Output = <T as Future>::Output;
S: Into<Dispatch>,
pub fn with_current_subscriber(self) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>
impl<T> Future for WithDispatch<T> where
T: Future, type Output = <T as Future>::Output;
[src]
Notable traits for WithDispatch<T>
impl<T> Future for WithDispatch<T> where
T: Future, type Output = <T as Future>::Output;