pub struct ResponseBuilder { /* private fields */ }
Expand description
A builder for `Response``
Implementations§
Source§impl ResponseBuilder
impl ResponseBuilder
Sourcepub fn new(status: impl IntoStatusCode) -> Self
pub fn new(status: impl IntoStatusCode) -> Self
Create a new ResponseBuilder
Sourcepub fn status(&mut self, status: impl IntoStatusCode) -> &mut Self
pub fn status(&mut self, status: impl IntoStatusCode) -> &mut Self
Set the status
Sourcepub fn headers(&mut self, headers: impl IntoHeaders) -> &mut Self
pub fn headers(&mut self, headers: impl IntoHeaders) -> &mut Self
Set the headers
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