pub trait TransportFactory: Send + Sync {
type Conn: FramedConnection;
// Required methods
fn connect<'life0, 'life1, 'async_trait>(
&'life0 self,
endpoint: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Self::Conn, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn bind<'life0, 'life1, 'async_trait>(
&'life0 self,
endpoint: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn TransportListener<Conn = Self::Conn>>, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
Factory to connect or accept connections using local sockets.
Required Associated Types§
type Conn: FramedConnection
Required Methods§
Sourcefn connect<'life0, 'life1, 'async_trait>(
&'life0 self,
endpoint: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Self::Conn, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn connect<'life0, 'life1, 'async_trait>(
&'life0 self,
endpoint: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Self::Conn, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Client side: connect to an endpoint (e.g., path or named pipe).
Sourcefn bind<'life0, 'life1, 'async_trait>(
&'life0 self,
endpoint: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn TransportListener<Conn = Self::Conn>>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn bind<'life0, 'life1, 'async_trait>(
&'life0 self,
endpoint: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn TransportListener<Conn = Self::Conn>>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Server side: bind and accept incoming connections.