pub struct ClientIpKeyExtractor;Expand description
Extract a client IP key from supported client-IP headers, falling back to the socket IP.
Use this extractor only when a platform or deployment boundary already guarantees that every
accepted client-IP Header is trustworthy, such as an application reachable only through a proxy
that removes or overwrites those Headers. This extractor does not validate the socket peer. If no
client-IP Header is present, it falls back to an Axum ConnectInfo<SocketAddr> or a generic
SocketAddr request extension. Choose one built-in IP extractor for the application’s network
topology; do not layer this extractor with another one.
Implementations§
Trait Implementations§
Source§impl Clone for ClientIpKeyExtractor
impl Clone for ClientIpKeyExtractor
Source§fn clone(&self) -> ClientIpKeyExtractor
fn clone(&self) -> ClientIpKeyExtractor
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ClientIpKeyExtractor
Source§impl Debug for ClientIpKeyExtractor
impl Debug for ClientIpKeyExtractor
Source§impl Default for ClientIpKeyExtractor
impl Default for ClientIpKeyExtractor
Source§fn default() -> ClientIpKeyExtractor
fn default() -> ClientIpKeyExtractor
Returns the “default value” for a type. Read more
impl Eq for ClientIpKeyExtractor
Source§impl KeyExtractor for ClientIpKeyExtractor
impl KeyExtractor for ClientIpKeyExtractor
Source§impl PartialEq for ClientIpKeyExtractor
impl PartialEq for ClientIpKeyExtractor
impl StructuralPartialEq for ClientIpKeyExtractor
Auto Trait Implementations§
impl Freeze for ClientIpKeyExtractor
impl RefUnwindSafe for ClientIpKeyExtractor
impl Send for ClientIpKeyExtractor
impl Sync for ClientIpKeyExtractor
impl Unpin for ClientIpKeyExtractor
impl UnsafeUnpin for ClientIpKeyExtractor
impl UnwindSafe for ClientIpKeyExtractor
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.