Struct fire_http_representation::response::ResponseBuilder
source · [−]pub struct ResponseBuilder { /* private fields */ }
Expand description
A builder to create a Response
.
Implementations
sourceimpl 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<T>(self, content_type: T) -> Self where
T: Into<ContentType>,
pub fn content_type<T>(self, content_type: T) -> Self where
T: Into<ContentType>,
Sets the content type.
sourcepub fn header<K, V>(self, key: K, val: V) -> Self where
K: IntoHeaderName,
V: IntoHeaderValue,
pub fn header<K, V>(self, key: K, val: V) -> Self where
K: IntoHeaderName,
V: IntoHeaderValue,
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more