pub struct RequestHead {
pub id: usize,
pub uri: Uri,
pub method: Method,
pub version: Version,
pub headers: HeaderMap,
pub extensions: RefCell<Extensions>,
/* private fields */
}Fields§
§id: usize§uri: Uri§method: Method§version: Version§headers: HeaderMap§extensions: RefCell<Extensions>Implementations§
Source§impl RequestHead
impl RequestHead
Sourcepub fn extensions(&self) -> Ref<'_, Extensions>
pub fn extensions(&self) -> Ref<'_, Extensions>
Message extensions
Sourcepub fn extensions_mut(&self) -> RefMut<'_, Extensions>
pub fn extensions_mut(&self) -> RefMut<'_, Extensions>
Mutable reference to a the message’s extensions
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_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)
Sourcepub fn peer_addr(&self) -> Option<SocketAddr>
pub fn peer_addr(&self) -> Option<SocketAddr>
Peer socket address
Peer address is actual socket address, if proxy is used in front of ntex http server, then peer address would be address of this proxy.
Trait Implementations§
Source§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 UnsafeUnpin 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