pub struct ErrorResponse(/* private fields */);Expand description
A response containing a status code and multiple errors.
Implementations§
Source§impl ErrorResponse
impl ErrorResponse
Sourcepub fn new(status_code: StatusCode) -> Self
pub fn new(status_code: StatusCode) -> Self
Creates a new ErrorResponse with the given HTTP status code.
Sourcepub fn push_error(&mut self, error: Error)
pub fn push_error(&mut self, error: Error)
Adds a new error to the response.
Auto Trait Implementations§
impl Freeze for ErrorResponse
impl RefUnwindSafe for ErrorResponse
impl Send for ErrorResponse
impl Sync for ErrorResponse
impl Unpin for ErrorResponse
impl UnwindSafe for ErrorResponse
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