[−][src]Trait fizyr_rpc::util::Listener
Trait for listeners that can accept new connections.
Associated Types
type Connection: Debug
[src]
The type of the connections return by the Self::accept()
function.
type Address: Debug
[src]
The type of the address returned by the Self::accept()
function.
Required methods
fn poll_accept(
self: Pin<&mut Self>,
context: &mut Context<'_>
) -> Poll<Result<(Self::Connection, Self::Address)>>
[src]
self: Pin<&mut Self>,
context: &mut Context<'_>
) -> Poll<Result<(Self::Connection, Self::Address)>>
Try to accept a new connection without blocking.
If no new connection is available, the current task is scheduled to wake up when a new connection is ready.
Provided methods
fn accept(&mut self) -> Accept<'_, Self>ⓘ where
Self: Unpin,
[src]
Self: Unpin,
Asynchronously accept a new connection.
Implementations on Foreign Types
impl Listener for TcpListener
[src]
type Address = SocketAddr
type Connection = TcpStream
fn poll_accept(
self: Pin<&mut Self>,
context: &mut Context<'_>
) -> Poll<Result<(Self::Connection, Self::Address)>>
[src]
self: Pin<&mut Self>,
context: &mut Context<'_>
) -> Poll<Result<(Self::Connection, Self::Address)>>
impl Listener for UnixListener
[src]
type Address = ()
type Connection = UnixStream
fn poll_accept(
self: Pin<&mut Self>,
context: &mut Context<'_>
) -> Poll<Result<(Self::Connection, Self::Address)>>
[src]
self: Pin<&mut Self>,
context: &mut Context<'_>
) -> Poll<Result<(Self::Connection, Self::Address)>>
impl Listener for UnixSeqpacketListener
[src]
type Address = ()
type Connection = UnixSeqpacket
fn poll_accept(
self: Pin<&mut Self>,
context: &mut Context<'_>
) -> Poll<Result<(Self::Connection, Self::Address)>>
[src]
self: Pin<&mut Self>,
context: &mut Context<'_>
) -> Poll<Result<(Self::Connection, Self::Address)>>
impl<T: ?Sized> Listener for &mut T where
T: Listener + Unpin,
[src]
T: Listener + Unpin,
type Address = T::Address
type Connection = T::Connection
fn poll_accept(
mut self: Pin<&mut Self>,
context: &mut Context<'_>
) -> Poll<Result<(Self::Connection, Self::Address)>>
[src]
mut self: Pin<&mut Self>,
context: &mut Context<'_>
) -> Poll<Result<(Self::Connection, Self::Address)>>
impl<T: ?Sized> Listener for Box<T> where
T: Listener + Unpin,
[src]
T: Listener + Unpin,
type Address = T::Address
type Connection = T::Connection
fn poll_accept(
mut self: Pin<&mut Self>,
context: &mut Context<'_>
) -> Poll<Result<(Self::Connection, Self::Address)>>
[src]
mut self: Pin<&mut Self>,
context: &mut Context<'_>
) -> Poll<Result<(Self::Connection, Self::Address)>>
impl<P> Listener for Pin<P> where
P: DerefMut + Unpin,
P::Target: Listener,
[src]
P: DerefMut + Unpin,
P::Target: Listener,
type Address = <P::Target as Listener>::Address
type Connection = <P::Target as Listener>::Connection
fn poll_accept(
self: Pin<&mut Self>,
context: &mut Context<'_>
) -> Poll<Result<(Self::Connection, Self::Address)>>
[src]
self: Pin<&mut Self>,
context: &mut Context<'_>
) -> Poll<Result<(Self::Connection, Self::Address)>>