Trait treemux::RequestExt[][src]

pub trait RequestExt {
    fn params(&self) -> &Params;
fn route(&self) -> &str;
fn remote_addr(&self) -> SocketAddr;
fn app_context<T: Send + Sync + 'static>(&self) -> Option<Arc<T>>; }

Extensions to the request object for accessing the route parameters, remote address

Required methods

fn params(&self) -> &Params[src]

The route parameters if any.

fn route(&self) -> &str[src]

The matched route pattern

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

The remote address for the request, also respects X-Forwarded-For

fn app_context<T: Send + Sync + 'static>(&self) -> Option<Arc<T>>[src]

Contains the application context when created with into_service_with_context

Loading content...

Implementations on Foreign Types

impl RequestExt for Request<Body>[src]

Loading content...

Implementors

Loading content...