Struct ntex::http::Request[][src]

pub struct Request { /* fields omitted */ }

Request

Implementations

impl Request[src]

pub fn new() -> Request[src]

Create new Request instance

impl Request[src]

pub fn with_payload(payload: Payload) -> Request[src]

Create new Request instance

pub fn head(&self) -> &RequestHead[src]

Http message part of the request

pub fn uri(&self) -> &Uri[src]

Request's uri.

pub fn uri_mut(&mut self) -> &mut Uri[src]

Mutable reference to the request's uri.

pub fn method(&self) -> &Method[src]

Read the Request method.

pub fn version(&self) -> Version[src]

Read the Request Version.

pub fn path(&self) -> &str[src]

The target path of this Request.

pub fn headers(&self) -> &HeaderMap[src]

Request's headers.

pub fn headers_mut(&mut self) -> &mut HeaderMap[src]

Mutable reference to the message's headers.

pub fn upgrade(&self) -> bool[src]

Check if request requires connection upgrade

pub fn peer_addr(&self) -> Option<SocketAddr>[src]

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.

pub fn payload(&mut self) -> &mut Payload[src]

Get request's payload

pub fn take_payload(&mut self) -> Payload[src]

Get request's payload

pub fn replace_payload(&mut self, payload: Payload) -> Payload[src]

Replace request's payload, returns old one

pub fn extensions(&self) -> Ref<'_, Extensions>[src]

Request extensions

pub fn extensions_mut(&self) -> RefMut<'_, Extensions>[src]

Mutable reference to a the request's extensions

Trait Implementations

impl Debug for Request[src]

impl HttpMessage for Request[src]

fn message_extensions(&self) -> Ref<'_, Extensions>[src]

Request extensions

fn message_extensions_mut(&self) -> RefMut<'_, Extensions>[src]

Mutable reference to a the request's extensions

Auto Trait Implementations

impl !RefUnwindSafe for Request

impl !Send for Request

impl !Sync for Request

impl Unpin for Request

impl !UnwindSafe for Request

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,