pub trait UnixStreamConnectorFactory<State>:
Send
+ Sync
+ 'static {
type Connector: UnixStreamConnector;
type Error;
// Required method
fn make_connector(
&self,
ctx: Context<State>,
) -> impl Future<Output = Result<CreatedUnixStreamConnector<State, Self::Connector>, Self::Error>> + Send + '_;
}Available on
target_family="unix" only.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§
Sourcetype Connector: UnixStreamConnector
type Connector: UnixStreamConnector
UnixStreamConnector created by this UnixStreamConnectorFactory
Sourcetype Error
type Error
Error returned in case UnixStreamConnectorFactory was
not able to create a UnixStreamConnector.
Required Methods§
Sourcefn make_connector(
&self,
ctx: Context<State>,
) -> impl Future<Output = Result<CreatedUnixStreamConnector<State, Self::Connector>, Self::Error>> + Send + '_
fn make_connector( &self, ctx: Context<State>, ) -> impl Future<Output = Result<CreatedUnixStreamConnector<State, 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.