pub struct TypedResponse<R> { /* private fields */ }Expand description
Wrapper that lets typed handlers override the response BodyFormat.
Use helpers like TypedResponse::json or TypedResponse::beve to keep call sites concise.
Implementations§
Source§impl<R> TypedResponse<R>
impl<R> TypedResponse<R>
Trait Implementations§
Source§impl<R> IntoTypedResponse<R> for TypedResponse<R>
impl<R> IntoTypedResponse<R> for TypedResponse<R>
fn into_typed_response(self) -> (R, BodyFormat)
Auto Trait Implementations§
impl<R> Freeze for TypedResponse<R>where
R: Freeze,
impl<R> RefUnwindSafe for TypedResponse<R>where
R: RefUnwindSafe,
impl<R> Send for TypedResponse<R>where
R: Send,
impl<R> Sync for TypedResponse<R>where
R: Sync,
impl<R> Unpin for TypedResponse<R>where
R: Unpin,
impl<R> UnsafeUnpin for TypedResponse<R>where
R: UnsafeUnpin,
impl<R> UnwindSafe for TypedResponse<R>where
R: 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