pub struct HeaderV1 {
pub protocol: ProtocolSupportedV1,
pub addr_src: SocketAddr,
pub addr_dst: SocketAddr,
}Expand description
Proxy Protocol header for version 1 (text version) Example:
- TCP/IPv4:
PROXY TCP4 255.255.255.255 255.255.255.255 65535 65535\r\n - TCP/IPv6:
PROXY TCP6 ffff:f...f:ffff ffff:f...f:ffff 65535 65535\r\n - Unknown:
PROXY UNKNOWN\r\n
Fields§
§protocol: ProtocolSupportedV1§addr_src: SocketAddr§addr_dst: SocketAddrImplementations§
source§impl HeaderV1
impl HeaderV1
pub fn new(addr_src: SocketAddr, addr_dst: SocketAddr) -> Self
pub fn into_bytes(&self) -> Vec<u8> ⓘ
Trait Implementations§
source§impl PartialEq<HeaderV1> for HeaderV1
impl PartialEq<HeaderV1> for HeaderV1
impl Eq for HeaderV1
impl StructuralEq for HeaderV1
impl StructuralPartialEq for HeaderV1
Auto Trait Implementations§
impl RefUnwindSafe for HeaderV1
impl Send for HeaderV1
impl Sync for HeaderV1
impl Unpin for HeaderV1
impl UnwindSafe for HeaderV1
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere T: 'a,
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
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.