pub enum ProxyProtocolHeader {
AfInet {
client_ip: Ipv4Addr,
proxy_ip: Ipv4Addr,
client_port: u16,
proxy_port: u16,
},
AfInet6 {
client_ip: Ipv6Addr,
proxy_ip: Ipv6Addr,
client_port: u16,
proxy_port: u16,
},
}Variants§
Implementations§
Source§impl ProxyProtocolHeader
impl ProxyProtocolHeader
pub fn from_udp_flow(flow: &UdpFlow) -> Self
Source§impl ProxyProtocolHeader
impl ProxyProtocolHeader
pub async fn write_v1_tcp<W: AsyncWrite + Unpin>( &self, out: &mut W, ) -> Result<(), Error>
pub async fn write_v2_tcp<W: AsyncWrite + Unpin>( &self, out: &mut W, ) -> Result<(), Error>
pub fn write_v2_udp<W: Write>(&self, out: &mut W) -> Result<(), Error>
pub fn parse_v2_udp<R: Read>(buffer: &mut R) -> Option<Self>
Trait Implementations§
Source§impl Debug for ProxyProtocolHeader
impl Debug for ProxyProtocolHeader
Source§impl Display for ProxyProtocolHeader
impl Display for ProxyProtocolHeader
Source§impl PartialEq for ProxyProtocolHeader
impl PartialEq for ProxyProtocolHeader
impl Eq for ProxyProtocolHeader
impl StructuralPartialEq for ProxyProtocolHeader
Auto Trait Implementations§
impl Freeze for ProxyProtocolHeader
impl RefUnwindSafe for ProxyProtocolHeader
impl Send for ProxyProtocolHeader
impl Sync for ProxyProtocolHeader
impl Unpin for ProxyProtocolHeader
impl UnwindSafe for ProxyProtocolHeader
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.