[][src]Trait conduit::RequestExt

pub trait RequestExt {
    pub fn http_version(&self) -> Version;
pub fn method(&self) -> &Method;
pub fn scheme(&self) -> Scheme;
pub fn host(&self) -> Host<'_>;
pub fn virtual_root(&self) -> Option<&str>;
pub fn path(&self) -> &str;
pub fn path_mut(&mut self) -> &mut String;
pub fn query_string(&self) -> Option<&str>;
pub fn remote_addr(&self) -> SocketAddr;
pub fn content_length(&self) -> Option<u64>;
pub fn headers(&self) -> &HeaderMap;
pub fn body(&mut self) -> &mut dyn Read;
pub fn extensions(&self) -> &Extensions;
pub fn mut_extensions(&mut self) -> &mut Extensions; pub fn elapsed(&self) -> Duration { ... } }

Required methods

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

The version of HTTP being used

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

The request method, such as GET, POST, PUT, DELETE or PATCH

pub fn scheme(&self) -> Scheme[src]

The scheme part of the request URL

pub fn host(&self) -> Host<'_>[src]

The host part of the requested URL

pub fn virtual_root(&self) -> Option<&str>[src]

The initial part of the request URL's path that corresponds to a virtual root. This allows an application to have a virtual location that consumes part of the path.

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

The remainder of the path.

pub fn path_mut(&mut self) -> &mut String[src]

Obtain the request path for mutation/rewrite

pub fn query_string(&self) -> Option<&str>[src]

The portion of the request URL that follows the "?"

pub fn remote_addr(&self) -> SocketAddr[src]

The remote IP address of the client or the last proxy that sent the request.

pub fn content_length(&self) -> Option<u64>[src]

The byte-size of the body, if any

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

The request's headers, as conduit::Headers.

pub fn body(&mut self) -> &mut dyn Read[src]

A Reader for the body of the request

Blocking

The returned value implements the blocking Read API and should only be read from while in a blocking context.

pub fn extensions(&self) -> &Extensions[src]

A readable map of extensions

pub fn mut_extensions(&mut self) -> &mut Extensions[src]

A mutable map of extensions

Loading content...

Provided methods

pub fn elapsed(&self) -> Duration[src]

The elapsed time since the start of the request (headers received)

Panics

This method may panic if the server does not add StartInstant to the request extensions, or if it has been removed by the application.

Loading content...

Implementors

Loading content...