pub trait RequestExt {
// Required methods
fn params(&self) -> &Params;
fn route(&self) -> &str;
fn remote_addr(&self) -> SocketAddr;
fn app_context<T: Send + Sync + 'static>(&self) -> Option<Arc<T>>;
}
Expand description
Extensions to the request object for accessing the route parameters, remote address
Required Methods§
Sourcefn remote_addr(&self) -> SocketAddr
fn remote_addr(&self) -> SocketAddr
The remote address for the request, also respects X-Forwarded-For
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.