Struct actix_web::dev::ResponseHead
source · pub struct ResponseHead {
pub version: Version,
pub status: StatusCode,
pub headers: HeaderMap,
pub reason: Option<&'static str>,
/* private fields */
}
Fields§
§version: Version
§status: StatusCode
§headers: HeaderMap
§reason: Option<&'static str>
Implementations§
source§impl ResponseHead
impl ResponseHead
sourcepub fn new(status: StatusCode) -> ResponseHead
pub fn new(status: StatusCode) -> ResponseHead
Create new instance of ResponseHead
type
sourcepub fn headers_mut(&mut self) -> &mut HeaderMap
pub fn headers_mut(&mut self) -> &mut HeaderMap
Mutable reference to the message headers.
sourcepub fn set_camel_case_headers(&mut self, camel_case: bool)
pub fn set_camel_case_headers(&mut self, camel_case: bool)
Sets the flag that controls whether to send headers formatted as Camel-Case.
Only applicable to HTTP/1.x responses; HTTP/2 header names are always lowercase.
sourcepub fn set_connection_type(&mut self, ctype: ConnectionType)
pub fn set_connection_type(&mut self, ctype: ConnectionType)
Set connection type of the message
pub fn connection_type(&self) -> ConnectionType
sourcepub fn keep_alive(&self) -> bool
pub fn keep_alive(&self) -> bool
Check if keep-alive is enabled
sourcepub fn no_chunking(&mut self, val: bool)
pub fn no_chunking(&mut self, val: bool)
Set no chunking for payload
Trait Implementations§
source§impl Clone for ResponseHead
impl Clone for ResponseHead
source§fn clone(&self) -> ResponseHead
fn clone(&self) -> ResponseHead
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for ResponseHead
impl RefUnwindSafe for ResponseHead
impl Send for ResponseHead
impl Sync for ResponseHead
impl Unpin for ResponseHead
impl UnwindSafe for ResponseHead
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)