Struct tonic_types::Status [−][src]
Expand description
The Status
type defines a logical error model that is suitable for
different programming environments, including REST APIs and RPC APIs. It is
used by [gRPC](https://github.com/grpc). Each Status
message contains
three pieces of data: error code, error message, and error details.
You can find out more about this error model and how to work with it in the API Design Guide.
Fields
code: i32
The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
message: String
A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.
details: Vec<Any>
A list of messages that carry the error details. There is a common set of message types for APIs to use.
Trait Implementations
Returns the encoded length of the message without a length delimiter.
Encodes the message to a buffer. Read more
Encodes the message to a newly allocated buffer.
Encodes the message with a length-delimiter to a buffer. Read more
Encodes the message with a length-delimiter to a newly allocated buffer.
Decodes an instance of the message from a buffer. Read more
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError> where
B: Buf,
Self: Default,
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError> where
B: Buf,
Self: Default,
Decodes a length-delimited instance of the message from the buffer.
Decodes an instance of the message from a buffer, and merges it into self
. Read more
Decodes a length-delimited instance of the message from buffer, and
merges it into self
. Read more
Auto Trait Implementations
impl RefUnwindSafe for Status
impl UnwindSafe for Status
Blanket Implementations
Mutably borrows from an owned value. Read more