Struct fire_http_representation::header::ResponseHeaderBuilder [−][src]
pub struct ResponseHeaderBuilder { pub version: Option<Version>, pub status_code: Option<StatusCode>, pub content_type: Option<ContentType>, pub values: HeaderValues, }
Expand description
A build to create a ResponseHeader
.
Fields
version: Option<Version>
status_code: Option<StatusCode>
content_type: Option<ContentType>
values: HeaderValues
Implementations
impl ResponseHeaderBuilder
[src]
impl ResponseHeaderBuilder
[src]pub fn status_code(&mut self, status_code: StatusCode)
[src]
pub fn status_code(&mut self, status_code: StatusCode)
[src]Sets the status code.
pub fn content_type(&mut self, content_type: impl Into<ContentType>)
[src]
pub fn content_type(&mut self, content_type: impl Into<ContentType>)
[src]Sets the content type.
pub fn values_mut(&mut self) -> &mut HeaderValues
[src]
pub fn values_mut(&mut self) -> &mut HeaderValues
[src]Returns HeaderValues
mutably.
pub fn build(self) -> ResponseHeader
[src]
pub fn build(self) -> ResponseHeader
[src]Builds a ResponseHeader. Using default values for all not configered fields.
Trait Implementations
impl Clone for ResponseHeaderBuilder
[src]
impl Clone for ResponseHeaderBuilder
[src]fn clone(&self) -> ResponseHeaderBuilder
[src]
fn clone(&self) -> ResponseHeaderBuilder
[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl RefUnwindSafe for ResponseHeaderBuilder
impl Send for ResponseHeaderBuilder
impl Sync for ResponseHeaderBuilder
impl Unpin for ResponseHeaderBuilder
impl UnwindSafe for ResponseHeaderBuilder
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more