pub struct ErrorSchema {
pub error: ErrorBodySchema,
pub request_id: Option<String>,
}Expand description
Standard error response body
Fields§
§error: ErrorBodySchemaThe error details
request_id: Option<String>Optional request ID for tracing
Implementations§
Source§impl ErrorSchema
impl ErrorSchema
Sourcepub fn not_found_example() -> Self
pub fn not_found_example() -> Self
Create a sample not found error
Sourcepub fn internal_error_example() -> Self
pub fn internal_error_example() -> Self
Create a sample internal error
Sourcepub fn bad_request_example() -> Self
pub fn bad_request_example() -> Self
Create a sample bad request error
Trait Implementations§
Source§impl Clone for ErrorSchema
impl Clone for ErrorSchema
Source§fn clone(&self) -> ErrorSchema
fn clone(&self) -> ErrorSchema
Returns a duplicate 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 ErrorSchema
impl Debug for ErrorSchema
Source§impl<'de> Deserialize<'de> for ErrorSchema
impl<'de> Deserialize<'de> for ErrorSchema
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 Serialize for ErrorSchema
impl Serialize for ErrorSchema
Auto Trait Implementations§
impl Freeze for ErrorSchema
impl RefUnwindSafe for ErrorSchema
impl Send for ErrorSchema
impl Sync for ErrorSchema
impl Unpin for ErrorSchema
impl UnwindSafe for ErrorSchema
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