pub struct Errors(pub Vec<JsonApiError>);Available on crate feature
http only.Expand description
Several errors in one response.
JSON:API allows a document to carry more than one error, and a validation run usually produces several — a client fixing a form wants the whole list, not the first problem. The status is the most severe of them.
Debug so a test can .unwrap() a Result<_, Errors>; the derive is on
JsonApiError already, and a handler’s error type being un-debuggable
makes every test of one awkward for no benefit.
Tuple Fields§
§0: Vec<JsonApiError>Trait Implementations§
Source§impl From<JsonApiError> for Errors
impl From<JsonApiError> for Errors
Source§fn from(error: JsonApiError) -> Self
fn from(error: JsonApiError) -> Self
Converts to this type from the input type.
Source§impl From<Vec<JsonApiError>> for Errors
impl From<Vec<JsonApiError>> for Errors
Source§fn from(errors: Vec<JsonApiError>) -> Self
fn from(errors: Vec<JsonApiError>) -> Self
Converts to this type from the input type.
Source§impl IntoResponse for Errors
impl IntoResponse for Errors
Source§fn into_response(self) -> Response
fn into_response(self) -> Response
Create a response.
Auto Trait Implementations§
impl Freeze for Errors
impl RefUnwindSafe for Errors
impl Send for Errors
impl Sync for Errors
impl Unpin for Errors
impl UnsafeUnpin for Errors
impl UnwindSafe for Errors
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