#[non_exhaustive]pub struct Failure {
pub status: Option<u16>,
pub code: String,
pub message: String,
pub fields: Vec<FieldError>,
pub local: bool,
pub request_id: Option<String>,
pub idempotency_key: Option<String>,
pub attempts: u32,
pub retry_after: Option<Duration>,
/* private fields */
}Expand description
The details of a failed send.
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.status: Option<u16>The HTTP status, or None when no answer was received.
code: StringThe API error code (invalid_key, quota_exceeded, validation_failed, …), or
network_error / timeout.
message: StringA human-readable explanation (English).
fields: Vec<FieldError>Every invalid field, for Error::Validation.
local: booltrue when the SDK rejected the message before sending anything.
request_id: Option<String>The server’s request id (req_…), when it answered.
idempotency_key: Option<String>The Idempotency-Key that was used. Retry later with the same key to stay
duplicate-free.
attempts: u32The number of HTTP attempts made (0 when rejected locally).
retry_after: Option<Duration>The server’s Retry-After, when present.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Failure
impl !UnwindSafe for Failure
impl Freeze for Failure
impl Send for Failure
impl Sync for Failure
impl Unpin for Failure
impl UnsafeUnpin for Failure
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