#[non_exhaustive]pub enum ClientIpSource {
CfConnectingIp,
CloudFrontViewerAddress,
ConnectInfo,
FlyClientIp,
RightmostForwarded,
RightmostXForwardedFor,
TrueClientIp,
XRealIp,
}
Expand description
ClientIp
source configuration
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
CfConnectingIp
IP from the CF-Connecting-IP
header
CloudFrontViewerAddress
IP from the CloudFront-Viewer-Address
header
ConnectInfo
IP from the axum::extract::ConnectInfo
FlyClientIp
IP from the Fly-Client-IP
header
RightmostForwarded
Available on crate feature
forwarded-header
only.Rightmost IP from the Forwarded
header
RightmostXForwardedFor
Rightmost IP from the X-Forwarded-For
header
TrueClientIp
IP from the True-Client-IP
header
XRealIp
IP from the X-Real-Ip
header
Implementations§
Source§impl ClientIpSource
impl ClientIpSource
Sourcepub const fn into_extension(self) -> Extension<Self>
pub const fn into_extension(self) -> Extension<Self>
Wraps ClientIpSource
into the axum::extract::Extension
for passing to axum::routing::Router::layer
Trait Implementations§
Source§impl Clone for ClientIpSource
impl Clone for ClientIpSource
Source§fn clone(&self) -> ClientIpSource
fn clone(&self) -> ClientIpSource
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ClientIpSource
impl Debug for ClientIpSource
Source§impl<'de> Deserialize<'de> for ClientIpSource
impl<'de> Deserialize<'de> for ClientIpSource
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl FromStr for ClientIpSource
impl FromStr for ClientIpSource
Auto Trait Implementations§
impl Freeze for ClientIpSource
impl RefUnwindSafe for ClientIpSource
impl Send for ClientIpSource
impl Sync for ClientIpSource
impl Unpin for ClientIpSource
impl UnwindSafe for ClientIpSource
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