pub trait ITcpListener:
Unpin
+ Send
+ Sync {
// Required methods
fn accept<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(TcpStream, SocketAddr)>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn local_addr<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<SocketAddr>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
A TcpListener.
Required Methods§
fn accept<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(TcpStream, SocketAddr)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn local_addr<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<SocketAddr>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Trait Implementations§
Source§impl<T: ITcpListener> IntoDyn<Box<dyn ITcpListener>> for T
impl<T: ITcpListener> IntoDyn<Box<dyn ITcpListener>> for T
fn into_dyn(self) -> TcpListenerwhere
Self: Sized + 'static,
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".