pub struct HttpResponse<T = Value> {
pub status_code: u16,
pub headers: HashMap<String, String>,
pub body: T,
}Expand description
Buffered HTTP response returned from a function handler.
Fields§
§status_code: u16HTTP status code.
headers: HashMap<String, String>Response headers.
body: TResponse body.
Trait Implementations§
Source§impl<T: Clone> Clone for HttpResponse<T>
impl<T: Clone> Clone for HttpResponse<T>
Source§impl<T: Debug> Debug for HttpResponse<T>
impl<T: Debug> Debug for HttpResponse<T>
Source§impl<'de, T> Deserialize<'de> for HttpResponse<T>where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for HttpResponse<T>where
T: Deserialize<'de>,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl<T> Freeze for HttpResponse<T>where
T: Freeze,
impl<T> RefUnwindSafe for HttpResponse<T>where
T: RefUnwindSafe,
impl<T> Send for HttpResponse<T>where
T: Send,
impl<T> Sync for HttpResponse<T>where
T: Sync,
impl<T> Unpin for HttpResponse<T>where
T: Unpin,
impl<T> UnsafeUnpin for HttpResponse<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for HttpResponse<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