Struct tonic_richer_error::ErrorInfo
source · pub struct ErrorInfo {
pub reason: String,
pub domain: String,
pub metadata: HashMap<String, String>,
}
Expand description
Used to encode/decode the ErrorInfo
standard error message described in
error_details.proto. Describes the cause of the error with structured
details.
Fields§
§reason: String
Reason of the error. Should be a constant value that identifies the
proximate cause of the error. Error reasons should be unique within a
particular domain of errors. This should be at most 63 characters and
match /[A-Z0-9_]+/
.
domain: String
Logical grouping to which the “reason” belongs. Normally is the registered name of the service that generates the error.
metadata: HashMap<String, String>
Additional structured details about this error. Keys should match
/[a-zA-Z0-9-_]/
and be limited to 64 characters in length.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for ErrorInfo
impl Send for ErrorInfo
impl Sync for ErrorInfo
impl Unpin for ErrorInfo
impl UnwindSafe for ErrorInfo
Blanket Implementations§
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request