pub struct AsyncStdTcpListener { /* private fields */ }
Expand description
Async-std specific RuntimeTcpListener
implementation.
Trait Implementations§
Source§impl AsFd for AsyncStdTcpListener
impl AsFd for AsyncStdTcpListener
Source§fn as_fd(&self) -> BorrowedFd<'_>
fn as_fd(&self) -> BorrowedFd<'_>
Borrows the file descriptor. Read more
Source§impl AsRawFd for AsyncStdTcpListener
impl AsRawFd for AsyncStdTcpListener
Source§impl From<OwnedFd> for AsyncStdTcpListener
impl From<OwnedFd> for AsyncStdTcpListener
Source§impl RuntimeTcpListener for AsyncStdTcpListener
impl RuntimeTcpListener for AsyncStdTcpListener
Source§type Runtime = AsyncStdGlobalRuntime
type Runtime = AsyncStdGlobalRuntime
An async runtime.
Source§fn accept(
&self,
) -> impl Future<Output = Result<(<Self::Runtime as NetRuntime>::TcpStream, SocketAddr)>> + Send
fn accept( &self, ) -> impl Future<Output = Result<(<Self::Runtime as NetRuntime>::TcpStream, SocketAddr)>> + Send
Accept a new incoming connection from this listener. Read more
Source§fn bind(
runtime: &Self::Runtime,
addr: impl ToSocketAddrs<Self::Runtime>,
) -> impl Future<Output = Result<Self>> + Sendwhere
Self: Sized,
fn bind(
runtime: &Self::Runtime,
addr: impl ToSocketAddrs<Self::Runtime>,
) -> impl Future<Output = Result<Self>> + Sendwhere
Self: Sized,
Creates a new
TcpListener
which will be bound to the specified address. Read moreSource§fn local_addr(&self) -> Result<SocketAddr>
fn local_addr(&self) -> Result<SocketAddr>
Returns the local socket address of this listener.
Auto Trait Implementations§
impl Freeze for AsyncStdTcpListener
impl RefUnwindSafe for AsyncStdTcpListener
impl Send for AsyncStdTcpListener
impl Sync for AsyncStdTcpListener
impl Unpin for AsyncStdTcpListener
impl UnwindSafe for AsyncStdTcpListener
Blanket Implementations§
Source§impl<T> AsSource for Twhere
T: AsFd,
impl<T> AsSource for Twhere
T: AsFd,
Source§fn source(&self) -> BorrowedFd<'_>
fn source(&self) -> BorrowedFd<'_>
Returns the borrowed file descriptor.
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