Struct proxy_header::ProxiedAddress
source · pub struct ProxiedAddress {
pub protocol: Protocol,
pub source: SocketAddr,
pub destination: SocketAddr,
}
Expand description
Address information from a PROXY protocol header
Fields§
§protocol: Protocol
Protocol type (TCP or UDP)
source: SocketAddr
Source address (this is the address of the actual client)
destination: SocketAddr
Destination address (this is the address of the proxy)
Implementations§
source§impl ProxiedAddress
impl ProxiedAddress
pub fn stream(source: SocketAddr, destination: SocketAddr) -> Self
pub fn datagram(source: SocketAddr, destination: SocketAddr) -> Self
Trait Implementations§
source§impl Clone for ProxiedAddress
impl Clone for ProxiedAddress
source§fn clone(&self) -> ProxiedAddress
fn clone(&self) -> ProxiedAddress
Returns a copy 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 ProxiedAddress
impl Debug for ProxiedAddress
source§impl Hash for ProxiedAddress
impl Hash for ProxiedAddress
source§impl PartialEq for ProxiedAddress
impl PartialEq for ProxiedAddress
impl Eq for ProxiedAddress
impl StructuralPartialEq for ProxiedAddress
Auto Trait Implementations§
impl Freeze for ProxiedAddress
impl RefUnwindSafe for ProxiedAddress
impl Send for ProxiedAddress
impl Sync for ProxiedAddress
impl Unpin for ProxiedAddress
impl UnwindSafe for ProxiedAddress
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)