Struct poem::listener::UnixAcceptor
source · pub struct UnixAcceptor { /* private fields */ }
Available on crate feature
server
and Unix only.Expand description
A acceptor that accepts connections.
Implementations
sourceimpl UnixAcceptor
impl UnixAcceptor
sourcepub fn from_std(listener: UnixListener) -> Result<Self>
pub fn from_std(listener: UnixListener) -> Result<Self>
Creates new UnixAcceptor
from a std::os::unix::net::UnixListener
.
Trait Implementations
sourceimpl Acceptor for UnixAcceptor
impl Acceptor for UnixAcceptor
type Io = UnixStream
type Io = UnixStream
IO stream type.
sourcefn local_addr(&self) -> Vec<LocalAddr> ⓘ
fn local_addr(&self) -> Vec<LocalAddr> ⓘ
Returns the local address that this listener is bound to.
Auto Trait Implementations
impl RefUnwindSafe for UnixAcceptor
impl Send for UnixAcceptor
impl Sync for UnixAcceptor
impl Unpin for UnixAcceptor
impl UnwindSafe for UnixAcceptor
Blanket Implementations
sourceimpl<T> AcceptorExt for Twhere
T: Acceptor,
impl<T> AcceptorExt for Twhere
T: Acceptor,
sourcefn combine<T>(self, other: T) -> Combined<Self, T>where
Self: Sized,
fn combine<T>(self, other: T) -> Combined<Self, T>where
Self: Sized,
Available on crate feature
server
only.Combine two acceptors.
sourcefn boxed(self) -> BoxAcceptorwhere
Self: Sized + 'static,
fn boxed(self) -> BoxAcceptorwhere
Self: Sized + 'static,
Available on crate feature
server
only.Wrap the acceptor in a
Box
.sourcefn rustls<S>(self, config_stream: S) -> RustlsAcceptor<Self, S>where
Self: Sized,
S: Stream<Item = RustlsConfig> + Send + Unpin + 'static,
fn rustls<S>(self, config_stream: S) -> RustlsAcceptor<Self, S>where
Self: Sized,
S: Stream<Item = RustlsConfig> + Send + Unpin + 'static,
Available on crate features
server
and rustls
only.Consume this acceptor and return a new TLS acceptor with
rustls
.sourcefn native_tls<S>(self, config_stream: S) -> NativeTlsAcceptor<Self, S>where
Self: Sized,
S: Stream<Item = NativeTlsConfig> + Send + Unpin + 'static,
fn native_tls<S>(self, config_stream: S) -> NativeTlsAcceptor<Self, S>where
Self: Sized,
S: Stream<Item = NativeTlsConfig> + Send + Unpin + 'static,
Available on crate features
server
and native-tls
only.Consume this acceptor and return a new TLS acceptor with
native-tls
.sourcefn openssl_tls<S>(self, config_stream: S) -> OpensslTlsAcceptor<Self, S>where
Self: Sized,
S: Stream<Item = OpensslTlsConfig> + Send + Unpin + 'static,
fn openssl_tls<S>(self, config_stream: S) -> OpensslTlsAcceptor<Self, S>where
Self: Sized,
S: Stream<Item = OpensslTlsConfig> + Send + Unpin + 'static,
Available on crate features
server
and openssl-tls
only.Consume this acceptor and return a new TLS acceptor with
openssl-tls
.sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more