pub struct HttpResponseBuilder { /* private fields */ }
Implementations§
Source§impl HttpResponseBuilder
impl HttpResponseBuilder
pub fn build(self) -> Result<HttpResponse, &'static str>
pub fn header(self, header: impl Into<String>, val: impl Into<String>) -> Self
pub fn set_header( &mut self, header: impl Into<String>, val: impl Into<String>, ) -> &mut Self
pub fn status(self, status: impl Into<u16>) -> Self
pub fn set_status(&mut self, status: impl Into<u16>) -> &mut Self
pub fn body(self, body: impl Into<Box<[u8]>>) -> Self
pub fn set_body(&mut self, body: impl Into<Box<[u8]>>) -> &mut Self
pub fn version(self, version: impl Into<f32>) -> Self
pub fn set_version(&mut self, version: impl Into<f32>) -> &mut Self
Auto Trait Implementations§
impl Freeze for HttpResponseBuilder
impl RefUnwindSafe for HttpResponseBuilder
impl Send for HttpResponseBuilder
impl Sync for HttpResponseBuilder
impl Unpin for HttpResponseBuilder
impl UnwindSafe for HttpResponseBuilder
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