Enum hyperdriver::server::conn::AcceptorCore
source · pub enum AcceptorCore {
Tcp(TcpListener),
Duplex(DuplexIncoming),
Unix(UnixListener),
}Available on crate features
server and stream only.Expand description
A stream of incoming connections.
This is a wrapper around hyper’s AddrIncoming
and TlsAcceptor types, using enum-dispatch,
for compatibility with Stream.
Variants§
Tcp(TcpListener)
A TCP listener.
Duplex(DuplexIncoming)
A duplex listener.
Unix(UnixListener)
A Unix listener.
Trait Implementations§
source§impl Accept for AcceptorCore
impl Accept for AcceptorCore
source§impl Debug for AcceptorCore
impl Debug for AcceptorCore
source§impl From<DuplexIncoming> for AcceptorCore
impl From<DuplexIncoming> for AcceptorCore
source§fn from(value: DuplexIncoming) -> Self
fn from(value: DuplexIncoming) -> Self
Converts to this type from the input type.
source§impl From<TcpListener> for AcceptorCore
impl From<TcpListener> for AcceptorCore
source§fn from(value: TcpListener) -> Self
fn from(value: TcpListener) -> Self
Converts to this type from the input type.
source§impl From<UnixListener> for AcceptorCore
impl From<UnixListener> for AcceptorCore
source§fn from(value: UnixListener) -> Self
fn from(value: UnixListener) -> Self
Converts to this type from the input type.
impl<'pin> Unpin for AcceptorCorewhere
__AcceptorCore<'pin>: Unpin,
Auto Trait Implementations§
impl !Freeze for AcceptorCore
impl !RefUnwindSafe for AcceptorCore
impl Send for AcceptorCore
impl Sync for AcceptorCore
impl !UnwindSafe for AcceptorCore
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> 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> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
source§impl<A> TlsAcceptExt for Awhere
A: Accept,
impl<A> TlsAcceptExt for Awhere
A: Accept,
source§fn tls(self, config: Arc<ServerConfig>) -> TlsAcceptor<Self>where
Self: Sized,
fn tls(self, config: Arc<ServerConfig>) -> TlsAcceptor<Self>where
Self: Sized,
Available on crate features
server and tls only.Wrap the acceptor in a TLS acceptor using the given rustls::ServerConfig.