#[non_exhaustive]pub struct ErrorCause {
pub type: Option<String>,
pub reason: Option<String>,
pub stack_trace: Option<String>,
pub caused_by: Option<Box<ErrorCause>>,
pub root_cause: Option<Vec<ErrorCause>>,
pub suppressed: Option<Vec<ErrorCause>>,
pub metadata: IndexMap<String, Value>,
}Expand description
Cause and details about a request failure. This class defines the properties common to all error types. Additional details are also provided, that depend on the error type.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.type: Option<String>The type of error
reason: Option<String>A human-readable explanation of the error, in English.
stack_trace: Option<String>The server stack trace. Present only if the error_trace=true parameter was sent with the request.
caused_by: Option<Box<ErrorCause>>§root_cause: Option<Vec<ErrorCause>>§suppressed: Option<Vec<ErrorCause>>§metadata: IndexMap<String, Value>Properties the specification doesn’t name.
Implementations§
Source§impl ErrorCause
impl ErrorCause
Source§impl ErrorCause
impl ErrorCause
Sourcepub fn stack_trace(self, value: impl Into<String>) -> Self
pub fn stack_trace(self, value: impl Into<String>) -> Self
Sets stack_trace.
Sourcepub fn caused_by(self, value: impl Into<ErrorCause>) -> Self
pub fn caused_by(self, value: impl Into<ErrorCause>) -> Self
Sets caused_by.
Sourcepub fn root_cause(self, value: impl Into<Vec<ErrorCause>>) -> Self
pub fn root_cause(self, value: impl Into<Vec<ErrorCause>>) -> Self
Sets root_cause.
Sourcepub fn suppressed(self, value: impl Into<Vec<ErrorCause>>) -> Self
pub fn suppressed(self, value: impl Into<Vec<ErrorCause>>) -> Self
Sets suppressed.
Trait Implementations§
Source§impl Clone for ErrorCause
impl Clone for ErrorCause
Source§impl Debug for ErrorCause
impl Debug for ErrorCause
Source§impl<'de> Deserialize<'de> for ErrorCause
impl<'de> Deserialize<'de> for ErrorCause
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ErrorCause
impl PartialEq for ErrorCause
Source§impl Serialize for ErrorCause
impl Serialize for ErrorCause
impl StructuralPartialEq for ErrorCause
Auto Trait Implementations§
impl Freeze for ErrorCause
impl RefUnwindSafe for ErrorCause
impl Send for ErrorCause
impl Sync for ErrorCause
impl Unpin for ErrorCause
impl UnsafeUnpin for ErrorCause
impl UnwindSafe for ErrorCause
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