pub struct ProxyProtocolAcceptor<A> { /* private fields */ }
Available on crate feature
proxy_protocol
only.Expand description
Acceptor wrapper for receiving Proxy Protocol headers.
Implementations§
Source§impl<A> ProxyProtocolAcceptor<A>
impl<A> ProxyProtocolAcceptor<A>
Sourcepub fn new(inner: A) -> Self
pub fn new(inner: A) -> Self
Create a new proxy protocol acceptor from an initial acceptor. This is compatible with tls acceptors.
Sourcepub fn parsing_timeout(self, val: Duration) -> Self
pub fn parsing_timeout(self, val: Duration) -> Self
Override the default Proxy Header parsing timeout.
Source§impl<A> ProxyProtocolAcceptor<A>
impl<A> ProxyProtocolAcceptor<A>
Sourcepub fn acceptor<Acceptor>(
self,
acceptor: Acceptor,
) -> ProxyProtocolAcceptor<Acceptor>
pub fn acceptor<Acceptor>( self, acceptor: Acceptor, ) -> ProxyProtocolAcceptor<Acceptor>
Overwrite inner acceptor.
Trait Implementations§
Source§impl<A, I, S> Accept<I, S> for ProxyProtocolAcceptor<A>where
A: Accept<I, S> + Clone,
A::Stream: AsyncRead + AsyncWrite + Unpin,
I: AsyncRead + AsyncWrite + Unpin + Send + 'static,
impl<A, I, S> Accept<I, S> for ProxyProtocolAcceptor<A>where
A: Accept<I, S> + Clone,
A::Stream: AsyncRead + AsyncWrite + Unpin,
I: AsyncRead + AsyncWrite + Unpin + Send + 'static,
Source§type Stream = <A as Accept<I, S>>::Stream
type Stream = <A as Accept<I, S>>::Stream
The modified or transformed IO stream produced by
accept
.Source§type Service = ForwardClientIp<<A as Accept<I, S>>::Service>
type Service = ForwardClientIp<<A as Accept<I, S>>::Service>
The modified or transformed service produced by
accept
.Source§impl<A: Clone> Clone for ProxyProtocolAcceptor<A>
impl<A: Clone> Clone for ProxyProtocolAcceptor<A>
Source§fn clone(&self) -> ProxyProtocolAcceptor<A>
fn clone(&self) -> ProxyProtocolAcceptor<A>
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 moreAuto Trait Implementations§
impl<A> Freeze for ProxyProtocolAcceptor<A>where
A: Freeze,
impl<A> RefUnwindSafe for ProxyProtocolAcceptor<A>where
A: RefUnwindSafe,
impl<A> Send for ProxyProtocolAcceptor<A>where
A: Send,
impl<A> Sync for ProxyProtocolAcceptor<A>where
A: Sync,
impl<A> Unpin for ProxyProtocolAcceptor<A>where
A: Unpin,
impl<A> UnwindSafe for ProxyProtocolAcceptor<A>where
A: UnwindSafe,
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