pub struct ApiErrorResponse<T: Serialize + PartialEq> { /* private fields */ }
Expand description
Generic response structure shared by all API responses.
Implementations§
Source§impl<T: Serialize + PartialEq> ApiErrorResponse<T>
impl<T: Serialize + PartialEq> ApiErrorResponse<T>
pub fn new(status_code: StatusCode, message: T) -> Self
Trait Implementations§
Source§impl<T: Clone + Serialize + PartialEq> Clone for ApiErrorResponse<T>
impl<T: Clone + Serialize + PartialEq> Clone for ApiErrorResponse<T>
Source§fn clone(&self) -> ApiErrorResponse<T>
fn clone(&self) -> ApiErrorResponse<T>
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<T> Serialize for ApiErrorResponse<T>
impl<T> Serialize for ApiErrorResponse<T>
impl<T: Serialize + PartialEq> StructuralPartialEq for ApiErrorResponse<T>
Auto Trait Implementations§
impl<T> Freeze for ApiErrorResponse<T>where
T: Freeze,
impl<T> RefUnwindSafe for ApiErrorResponse<T>where
T: RefUnwindSafe,
impl<T> Send for ApiErrorResponse<T>where
T: Send,
impl<T> Sync for ApiErrorResponse<T>where
T: Sync,
impl<T> Unpin for ApiErrorResponse<T>where
T: Unpin,
impl<T> UnwindSafe for ApiErrorResponse<T>where
T: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> ServiceExt for T
impl<T> ServiceExt for T
Source§fn set_request_id<M>(
self,
header_name: HeaderName,
make_request_id: M,
) -> SetRequestId<Self, M>where
Self: Sized,
M: MakeRequestId,
fn set_request_id<M>(
self,
header_name: HeaderName,
make_request_id: M,
) -> SetRequestId<Self, M>where
Self: Sized,
M: MakeRequestId,
Add request id header and extension. Read more
Source§fn set_x_request_id<M>(self, make_request_id: M) -> SetRequestId<Self, M>where
Self: Sized,
M: MakeRequestId,
fn set_x_request_id<M>(self, make_request_id: M) -> SetRequestId<Self, M>where
Self: Sized,
M: MakeRequestId,
Add request id header and extension, using
x-request-id
as the header name. Read moreSource§fn propagate_request_id(
self,
header_name: HeaderName,
) -> PropagateRequestId<Self>where
Self: Sized,
fn propagate_request_id(
self,
header_name: HeaderName,
) -> PropagateRequestId<Self>where
Self: Sized,
Propgate request ids from requests to responses. Read more
Source§fn propagate_x_request_id(self) -> PropagateRequestId<Self>where
Self: Sized,
fn propagate_x_request_id(self) -> PropagateRequestId<Self>where
Self: Sized,
Propgate request ids from requests to responses, using
x-request-id
as the header name. Read more