pub struct HttpResponseBuilder { /* private fields */ }Implementations§
Source§impl HttpResponseBuilder
impl HttpResponseBuilder
pub fn new() -> Self
pub fn status(self, code: u16, text: &str) -> Self
pub fn header(self, key: &str, value: &str) -> Self
pub fn body(self, body: Vec<u8>) -> Self
pub fn json(self, json: &str) -> Self
pub fn html(self, html: &str) -> Self
pub fn build(self) -> HttpResponse
Trait Implementations§
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