Struct mas_listener::proxy_protocol::ProxyAcceptor
source · pub struct ProxyAcceptor { /* private fields */ }
Implementations§
source§impl ProxyAcceptor
impl ProxyAcceptor
pub const fn new() -> Self
sourcepub async fn accept<T>(
&self,
stream: T,
) -> Result<(ProxyProtocolV1Info, Rewind<T>), ProxyAcceptError>
pub async fn accept<T>( &self, stream: T, ) -> Result<(ProxyProtocolV1Info, Rewind<T>), ProxyAcceptError>
Accept a proxy-protocol stream
§Errors
Returns an error on read error on the underlying stream, or when the proxy protocol preamble couldn’t be parsed
Trait Implementations§
source§impl Clone for ProxyAcceptor
impl Clone for ProxyAcceptor
source§fn clone(&self) -> ProxyAcceptor
fn clone(&self) -> ProxyAcceptor
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 ProxyAcceptor
impl Debug for ProxyAcceptor
source§impl Default for ProxyAcceptor
impl Default for ProxyAcceptor
source§fn default() -> ProxyAcceptor
fn default() -> ProxyAcceptor
Returns the “default value” for a type. Read more
impl Copy for ProxyAcceptor
Auto Trait Implementations§
impl Freeze for ProxyAcceptor
impl RefUnwindSafe for ProxyAcceptor
impl Send for ProxyAcceptor
impl Sync for ProxyAcceptor
impl Unpin for ProxyAcceptor
impl UnwindSafe for ProxyAcceptor
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
)