pub struct Response<B = EmptyBody> {
pub metadata: ResponseMetadata,
pub body: B,
}Fields§
§metadata: ResponseMetadata§body: BImplementations§
Source§impl<B> Response<B>
impl<B> Response<B>
pub fn new(status: Status, body: B) -> Self
pub fn from_parts(metadata: ResponseMetadata, body: B) -> Self
pub fn into_parts(self) -> (ResponseMetadata, B)
Trait Implementations§
Auto Trait Implementations§
impl<B> Freeze for Response<B>where
B: Freeze,
impl<B> RefUnwindSafe for Response<B>where
B: RefUnwindSafe,
impl<B> Send for Response<B>where
B: Send,
impl<B> Sync for Response<B>where
B: Sync,
impl<B> Unpin for Response<B>where
B: Unpin,
impl<B> UnsafeUnpin for Response<B>where
B: UnsafeUnpin,
impl<B> UnwindSafe for Response<B>where
B: 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