pub struct HttpResponseBuilder { /* private fields */ }
Implementations§
Source§impl HttpResponseBuilder
impl HttpResponseBuilder
pub fn build(&mut self) -> Result<HttpResponse, &'static str>
pub fn header( &mut self, header: impl Into<String>, val: impl Into<String>, ) -> &mut Self
pub fn status(&mut self, status: impl Into<u16>) -> &mut Self
pub fn body(&mut self, body: impl Into<Box<[u8]>>) -> &mut Self
pub fn version(&mut self, version: impl Into<f32>) -> &mut Self
Trait Implementations§
Source§impl Clone for HttpResponseBuilder
impl Clone for HttpResponseBuilder
Source§fn clone(&self) -> HttpResponseBuilder
fn clone(&self) -> HttpResponseBuilder
Returns a duplicate 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 moreAuto 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