Struct mas_listener::proxy_protocol::MaybeProxyAcceptor
source · pub struct MaybeProxyAcceptor { /* private fields */ }
Implementations§
source§impl MaybeProxyAcceptor
impl MaybeProxyAcceptor
pub const fn new(proxied: bool) -> Self
pub const fn new_proxied(acceptor: ProxyAcceptor) -> Self
pub const fn new_unproxied() -> Self
pub const fn is_proxied(&self) -> bool
sourcepub async fn accept<T>(
&self,
stream: T,
) -> Result<(Option<ProxyProtocolV1Info>, Rewind<T>), ProxyAcceptError>
pub async fn accept<T>( &self, stream: T, ) -> Result<(Option<ProxyProtocolV1Info>, Rewind<T>), ProxyAcceptError>
Accept a connection and do the proxy protocol handshake
§Errors
Returns an error if the proxy protocol handshake failed
Trait Implementations§
source§impl Clone for MaybeProxyAcceptor
impl Clone for MaybeProxyAcceptor
source§fn clone(&self) -> MaybeProxyAcceptor
fn clone(&self) -> MaybeProxyAcceptor
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 moreimpl Copy for MaybeProxyAcceptor
Auto Trait Implementations§
impl Freeze for MaybeProxyAcceptor
impl RefUnwindSafe for MaybeProxyAcceptor
impl Send for MaybeProxyAcceptor
impl Sync for MaybeProxyAcceptor
impl Unpin for MaybeProxyAcceptor
impl UnwindSafe for MaybeProxyAcceptor
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: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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
)