pub struct ClientIpLayer { /* private fields */ }Expand description
Tower layer that extracts the client IP address and inserts
ClientIp into request extensions.
Apply with Router::layer(). When trusted proxies are configured,
X-Forwarded-For and X-Real-IP headers are only honoured for
connections originating from a trusted CIDR range.
Implementations§
Source§impl ClientIpLayer
impl ClientIpLayer
Trait Implementations§
Source§impl Clone for ClientIpLayer
impl Clone for ClientIpLayer
Source§impl Default for ClientIpLayer
impl Default for ClientIpLayer
Auto Trait Implementations§
impl Freeze for ClientIpLayer
impl RefUnwindSafe for ClientIpLayer
impl Send for ClientIpLayer
impl Sync for ClientIpLayer
impl Unpin for ClientIpLayer
impl UnsafeUnpin for ClientIpLayer
impl UnwindSafe for ClientIpLayer
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