pub struct ResponseBuilder { /* private fields */ }
Expand description
A builder to create a Response
.
Implementations§
source§impl ResponseBuilder
impl ResponseBuilder
sourcepub fn status_code(self, status_code: StatusCode) -> Self
pub fn status_code(self, status_code: StatusCode) -> Self
Sets the status code.
sourcepub fn content_type(self, content_type: impl Into<ContentType>) -> Self
pub fn content_type(self, content_type: impl Into<ContentType>) -> Self
Sets the content type.
sourcepub fn values_mut(&mut self) -> &mut HeaderValues
pub fn values_mut(&mut self) -> &mut HeaderValues
Returns HeaderValues
mutably.
Trait Implementations§
Auto Trait Implementations§
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