pub struct HttpResponse { /* private fields */ }Expand description
Concrete implementation of IHttpResponse.
Implementations§
Source§impl HttpResponse
impl HttpResponse
pub fn new(status: u16) -> HttpResponse
pub fn into_hyper(self) -> Response<Full<Bytes>>
Trait Implementations§
Source§impl IHttpResponse for HttpResponse
impl IHttpResponse for HttpResponse
fn set_status(&mut self, code: u16)
fn set_header(&mut self, key: &str, value: &str)
Source§fn remove_header(&mut self, key: &str)
fn remove_header(&mut self, key: &str)
Remove a response header by name. Default is a no-op.
Source§fn write_bytes<'life0, 'async_trait>(
&'life0 mut self,
data: Vec<u8>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
HttpResponse: 'async_trait,
fn write_bytes<'life0, 'async_trait>(
&'life0 mut self,
data: Vec<u8>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
HttpResponse: 'async_trait,
Write raw bytes as the response body.
Auto Trait Implementations§
impl Freeze for HttpResponse
impl RefUnwindSafe for HttpResponse
impl Send for HttpResponse
impl Sync 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