pub struct HttpResponse { /* private fields */ }
Implementations§
Source§impl HttpResponse
impl HttpResponse
pub fn builder() -> HttpResponseBuilder
Source§impl HttpResponse
impl HttpResponse
pub fn parse(stream: impl Into<HttpStream>) -> Result<Self>
pub fn status(&self) -> u16
pub fn content_length(&self) -> usize
Sourcepub fn header(&self, key: &str) -> Option<&str>
pub fn header(&self, key: &str) -> Option<&str>
Get the value of the given header key, if present
pub fn version(&self) -> f32
pub fn headers(&self) -> &HashMap<String, String>
pub fn body(&mut self) -> Option<&[u8]>
pub fn write_to(&mut self, out: &mut dyn Write) -> Result<usize>
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