pub trait Reactor: Driver {
// Required methods
fn tcp_connect(&self, addr: SocketAddr, cfg: SharedCfg) -> Receiver<Io> ⓘ;
fn unix_connect(&self, addr: PathBuf, cfg: SharedCfg) -> Receiver<Io> ⓘ;
fn from_tcp_stream(
&self,
stream: TcpStream,
cfg: SharedCfg,
) -> Result<Io, Error>;
fn from_unix_stream(&self, _: UnixStream, _: SharedCfg) -> Result<Io, Error>;
}Expand description
Runtime reactor used for network connection and transport operations.
Required Methods§
Sourcefn tcp_connect(&self, addr: SocketAddr, cfg: SharedCfg) -> Receiver<Io> ⓘ
fn tcp_connect(&self, addr: SocketAddr, cfg: SharedCfg) -> Receiver<Io> ⓘ
Starts an asynchronous TCP connection.
Sourcefn unix_connect(&self, addr: PathBuf, cfg: SharedCfg) -> Receiver<Io> ⓘ
fn unix_connect(&self, addr: PathBuf, cfg: SharedCfg) -> Receiver<Io> ⓘ
Starts an asynchronous Unix domain socket connection.
Sourcefn from_tcp_stream(
&self,
stream: TcpStream,
cfg: SharedCfg,
) -> Result<Io, Error>
fn from_tcp_stream( &self, stream: TcpStream, cfg: SharedCfg, ) -> Result<Io, Error>
Converts a standard-library TCP stream into an Io value.
Sourcefn from_unix_stream(&self, _: UnixStream, _: SharedCfg) -> Result<Io, Error>
fn from_unix_stream(&self, _: UnixStream, _: SharedCfg) -> Result<Io, Error>
Converts a standard-library Unix stream into an Io value.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".