pub struct HttpResponse { /* private fields */ }Expand description
HTTP GET result handed to user callbacks.
Implementations§
Source§impl HttpResponse
impl HttpResponse
Sourcepub fn status_code(&self) -> i32
pub fn status_code(&self) -> i32
HTTP status code (200, 206, 404, …).
pub fn set_status_code(&mut self, value: i32)
Sourcepub fn body_mut(&mut self) -> &mut [u8] ⓘ
pub fn body_mut(&mut self) -> &mut [u8] ⓘ
Zero-copy mutable view. Resize first — the borrow forbids it after.
pub fn set_body(&mut self, values: &[u8])
pub fn resize_body(&mut self, count: usize)
pub fn set_error(&mut self, value: &str)
Trait Implementations§
Source§impl Debug for HttpResponse
impl Debug for HttpResponse
Source§impl Default for HttpResponse
impl Default for HttpResponse
Source§impl Drop for HttpResponse
impl Drop for HttpResponse
impl Send for HttpResponse
Auto Trait Implementations§
impl !Sync for HttpResponse
impl Freeze for HttpResponse
impl RefUnwindSafe for HttpResponse
impl Unpin for HttpResponse
impl UnsafeUnpin 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