pub struct HttpResponse {
pub status: u16,
pub headers: Vec<HttpHeader>,
pub body: Vec<u8>,
}
Fields§
§status: u16
§headers: Vec<HttpHeader>
§body: Vec<u8>
Implementations§
source§impl HttpResponse
impl HttpResponse
pub fn status(status: u16) -> HttpResponseBuilder
pub fn ok() -> HttpResponseBuilder
Trait Implementations§
source§impl Clone for HttpResponse
impl Clone for HttpResponse
source§fn clone(&self) -> HttpResponse
fn clone(&self) -> HttpResponse
Returns a copy 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 Debug for HttpResponse
impl Debug for HttpResponse
source§impl Default for HttpResponse
impl Default for HttpResponse
source§fn default() -> HttpResponse
fn default() -> HttpResponse
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for HttpResponse
impl<'de> Deserialize<'de> for HttpResponse
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
source§impl From<HttpResponse> for ResponseAsync
impl From<HttpResponse> for ResponseAsync
source§fn from(effect_response: HttpResponse) -> Self
fn from(effect_response: HttpResponse) -> Self
Converts to this type from the input type.
source§impl PartialEq for HttpResponse
impl PartialEq for HttpResponse
source§impl Serialize for HttpResponse
impl Serialize for HttpResponse
impl Eq for HttpResponse
impl StructuralPartialEq for HttpResponse
Auto Trait Implementations§
impl Freeze for HttpResponse
impl RefUnwindSafe for HttpResponse
impl Send for HttpResponse
impl Sync for HttpResponse
impl Unpin for HttpResponse
impl UnwindSafe for HttpResponse
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)