pub enum IpSource {
DirectPeer,
TrustedHeader,
FallbackMissingHeader,
FallbackMalformed,
}Expand description
How client_ip was determined — for audit/logging and to decide warnings.
Variants§
DirectPeer
Peer is not a trusted proxy → peer used; forwarded header ignored.
TrustedHeader
Peer is a trusted proxy → IP read from the forwarded header.
FallbackMissingHeader
Behind a trusted proxy but the header was absent → fell back to peer.
FallbackMalformed
Behind a trusted proxy but the header was malformed, OR the chain was
shorter than trusted_hops → fell back to peer (never the spoofable IP).
Trait Implementations§
impl Copy for IpSource
impl Eq for IpSource
impl StructuralPartialEq for IpSource
Auto Trait Implementations§
impl Freeze for IpSource
impl RefUnwindSafe for IpSource
impl Send for IpSource
impl Sync for IpSource
impl Unpin for IpSource
impl UnsafeUnpin for IpSource
impl UnwindSafe for IpSource
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