#[non_exhaustive]pub struct ErrorEnvelope {
pub message: Option<String>,
pub code: Option<String>,
pub error_type: Option<String>,
pub param: Option<String>,
}Expand description
The fields of a recognised JSON error envelope (see error_envelope).
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.message: Option<String>The provider’s error text. Upstream text: it belongs in
Error::with_upstream_message, never in an authored message.
code: Option<String>Provider error code. Numeric codes are kept as their decimal text.
error_type: Option<String>Provider error type or category.
param: Option<String>The path of the rejected request field, such as
messages.[1].content.
Implementations§
Source§impl ErrorEnvelope
impl ErrorEnvelope
Trait Implementations§
Source§impl Clone for ErrorEnvelope
impl Clone for ErrorEnvelope
Source§impl Debug for ErrorEnvelope
impl Debug for ErrorEnvelope
Source§impl Default for ErrorEnvelope
impl Default for ErrorEnvelope
impl Eq for ErrorEnvelope
Source§impl PartialEq for ErrorEnvelope
impl PartialEq for ErrorEnvelope
impl StructuralPartialEq for ErrorEnvelope
Auto Trait Implementations§
impl Freeze for ErrorEnvelope
impl RefUnwindSafe for ErrorEnvelope
impl Send for ErrorEnvelope
impl Sync for ErrorEnvelope
impl Unpin for ErrorEnvelope
impl UnsafeUnpin for ErrorEnvelope
impl UnwindSafe for ErrorEnvelope
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