Struct appbiotic_code_error::ErrorStatus
source · pub struct ErrorStatus {
pub message: Option<String>,
pub details: Option<Vec<ErrorDetails>>,
}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. 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§
§message: Option<String>A developer-facing error message, which should be in English. Any
user-facing error message should be localized and sent in the
details field in a ErrorDetails::LocalizedMessage.
details: Option<Vec<ErrorDetails>>A list of messages that carry the error details. There is a common set of message types for APIs to use.
Implementations§
source§impl ErrorStatus
impl ErrorStatus
pub fn with_message<M: AsRef<str>>(self, message: M) -> Self
pub fn with_error<E: Display>(self, error: E) -> Self
Trait Implementations§
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 Default for ErrorStatus
impl Default for ErrorStatus
source§fn default() -> ErrorStatus
fn default() -> ErrorStatus
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl RefUnwindSafe for ErrorStatus
impl Send for ErrorStatus
impl Sync for ErrorStatus
impl Unpin for ErrorStatus
impl UnwindSafe for ErrorStatus
Blanket Implementations§
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