Trait ForwardedClientExt
pub trait ForwardedClientExt: ExtensionsRef + Sealed {
// Provided methods
fn forwarded_client(&self) -> Option<&ForwardedElement> { ... }
fn forwarded_client_ip(&self) -> Option<IpAddr> { ... }
fn forwarded_client_socket_addr(&self) -> Option<SocketAddress> { ... }
fn forwarded_client_host(&self) -> Option<&ForwardedAuthority> { ... }
fn forwarded_client_proto(&self) -> Option<ForwardedProtocol> { ... }
fn forwarded_client_version(&self) -> Option<ForwardedVersion> { ... }
}Available on crate feature
net only.Expand description
The client of the Forwarded chain in these extensions, selected by their
ForwardedSelectionPolicy, else the default one (the rightmost element).
Implemented for every ExtensionsRef; sealed, as it only reads what the extensions hold.
Unlike ClientIp it never falls back to the connection’s peer.
Provided Methods§
fn forwarded_client(&self) -> Option<&ForwardedElement>
fn forwarded_client(&self) -> Option<&ForwardedElement>
The element describing the client.
fn forwarded_client_ip(&self) -> Option<IpAddr>
fn forwarded_client_ip(&self) -> Option<IpAddr>
The client’s IP, from its for node.
fn forwarded_client_socket_addr(&self) -> Option<SocketAddress>
fn forwarded_client_socket_addr(&self) -> Option<SocketAddress>
The client’s IP and port, from its for node.
fn forwarded_client_host(&self) -> Option<&ForwardedAuthority>
fn forwarded_client_host(&self) -> Option<&ForwardedAuthority>
The host the client asked for.
fn forwarded_client_proto(&self) -> Option<ForwardedProtocol>
fn forwarded_client_proto(&self) -> Option<ForwardedProtocol>
The protocol the client used.
fn forwarded_client_version(&self) -> Option<ForwardedVersion>
fn forwarded_client_version(&self) -> Option<ForwardedVersion>
The HTTP version the client used.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".