Struct actix_web::dev::RequestHead
source · pub struct RequestHead {
pub method: Method,
pub uri: Uri,
pub version: Version,
pub headers: HeaderMap,
pub peer_addr: Option<SocketAddr>,
/* private fields */
}
Fields§
§method: Method
§uri: Uri
§version: Version
§headers: HeaderMap
§peer_addr: Option<SocketAddr>
Will only be None when called in unit tests unless set manually.
Implementations§
source§impl RequestHead
impl RequestHead
sourcepub fn headers_mut(&mut self) -> &mut HeaderMap
pub fn headers_mut(&mut self) -> &mut HeaderMap
Mutable reference to the message headers.
sourcepub fn camel_case_headers(&self) -> bool
pub fn camel_case_headers(&self) -> bool
Is to uppercase headers with Camel-Case.
Default is false
sourcepub fn set_camel_case_headers(&mut self, val: bool)
pub fn set_camel_case_headers(&mut self, val: bool)
Set true
to send headers which are formatted as Camel-Case.
sourcepub fn set_connection_type(&mut self, ctype: ConnectionType)
pub fn set_connection_type(&mut self, ctype: ConnectionType)
Set connection type of the message
sourcepub fn connection_type(&self) -> ConnectionType
pub fn connection_type(&self) -> ConnectionType
Connection type
pub fn no_chunking(&mut self, val: bool)
Trait Implementations§
source§impl Clone for RequestHead
impl Clone for RequestHead
source§fn clone(&self) -> RequestHead
fn clone(&self) -> RequestHead
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 moresource§impl Debug for RequestHead
impl Debug for RequestHead
source§impl Default for RequestHead
impl Default for RequestHead
source§fn default() -> RequestHead
fn default() -> RequestHead
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for RequestHead
impl RefUnwindSafe for RequestHead
impl Send for RequestHead
impl Sync for RequestHead
impl Unpin for RequestHead
impl UnwindSafe for RequestHead
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