Trait UnixStreamConnectorFactory
pub trait UnixStreamConnectorFactory:
Send
+ Sync
+ 'static {
type Connector: UnixStreamConnector;
type Error;
// Required method
fn make_connector(
&self,
) -> impl Future<Output = Result<CreatedUnixStreamConnector<Self::Connector>, Self::Error>> + Send;
}Expand description
Factory to create a UnixStreamConnector. This is used by the Unix
stream service to create a stream within a specific [Context].
In the most simplest case you use a UnixStreamConnectorCloneFactory
to use a Cloneable UnixStreamConnectorCloneFactory, but in more
advanced cases you can use variants of UnixStreamConnector specific
to the given contexts.
Required Associated Types§
type Connector: UnixStreamConnector
type Connector: UnixStreamConnector
UnixStreamConnector created by this UnixStreamConnectorFactory
type Error
type Error
Error returned in case UnixStreamConnectorFactory was
not able to create a UnixStreamConnector.
Required Methods§
fn make_connector(
&self,
) -> impl Future<Output = Result<CreatedUnixStreamConnector<Self::Connector>, Self::Error>> + Send
fn make_connector( &self, ) -> impl Future<Output = Result<CreatedUnixStreamConnector<Self::Connector>, Self::Error>> + Send
Try to create a UnixStreamConnector, and return an error or otherwise.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.