pub struct ApiError {
pub status_code: Option<u16>,
pub name: String,
pub message: String,
}Expand description
The API’s canonical error shape ({ statusCode, name, message }), plus the
client-side conditions that never reached the API, which carry
status_code: None. Mirrors Resend’s ErrorResponse, so code that switches
on name ports across unchanged.
Fields§
§status_code: Option<u16>HTTP status; None when the request never reached the API.
name: StringStable snake_case discriminant, e.g. validation_error, not_found.
message: StringTrait Implementations§
impl Eq for ApiError
impl StructuralPartialEq for ApiError
Auto Trait Implementations§
impl Freeze for ApiError
impl RefUnwindSafe for ApiError
impl Send for ApiError
impl Sync for ApiError
impl Unpin for ApiError
impl UnsafeUnpin for ApiError
impl UnwindSafe for ApiError
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