pub struct ResponseBuilder { /* private fields */ }
Implementations§
Source§impl ResponseBuilder
impl ResponseBuilder
pub fn new(code: i32, body: Option<String>) -> Self
pub fn content_type(self, content_type: String) -> Self
pub fn build(&self) -> HTTPResponse
pub fn put_header(self, key: HeaderKey, value: HeaderValue) -> ResponseBuilder
pub fn body(self, body: String) -> ResponseBuilder
Trait Implementations§
Source§impl Default for ResponseBuilder
impl Default for ResponseBuilder
Source§fn default() -> ResponseBuilder
fn default() -> ResponseBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ResponseBuilder
impl RefUnwindSafe for ResponseBuilder
impl Send for ResponseBuilder
impl Sync for ResponseBuilder
impl Unpin for ResponseBuilder
impl UnwindSafe for ResponseBuilder
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