UnixStreamConnector

Trait UnixStreamConnector 

Source
pub trait UnixStreamConnector:
    Send
    + Sync
    + 'static {
    type Error;

    // Required method
    fn connect(
        &self,
        path: PathBuf,
    ) -> impl Future<Output = Result<UnixStream, Self::Error>> + Send + '_;
}
Available on target_family="unix" only.
Expand description

Trait used by the UnixConnector to actually establish the UnixStream.

Required Associated Types§

Source

type Error

Type of error that can occurr when establishing the connection failed.

Required Methods§

Source

fn connect( &self, path: PathBuf, ) -> impl Future<Output = Result<UnixStream, Self::Error>> + Send + '_

Connect to the path and return the established UnixStream.

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.

Implementations on Foreign Types§

Source§

impl UnixStreamConnector for ()

Source§

type Error = Error

Source§

fn connect( &self, path: PathBuf, ) -> impl Future<Output = Result<UnixStream, Self::Error>> + Send + '_

Source§

impl<A, B> UnixStreamConnector for Either<A, B>

Source§

type Error = Box<dyn Error + Send + Sync>

Source§

async fn connect(&self, path: PathBuf) -> Result<UnixStream, Self::Error>

Source§

impl<A, B, C> UnixStreamConnector for Either3<A, B, C>

Source§

type Error = Box<dyn Error + Send + Sync>

Source§

async fn connect(&self, path: PathBuf) -> Result<UnixStream, Self::Error>

Source§

impl<A, B, C, D> UnixStreamConnector for Either4<A, B, C, D>

Source§

type Error = Box<dyn Error + Send + Sync>

Source§

async fn connect(&self, path: PathBuf) -> Result<UnixStream, Self::Error>

Source§

impl<A, B, C, D, E> UnixStreamConnector for Either5<A, B, C, D, E>

Source§

type Error = Box<dyn Error + Send + Sync>

Source§

async fn connect(&self, path: PathBuf) -> Result<UnixStream, Self::Error>

Source§

impl<A, B, C, D, E, F> UnixStreamConnector for Either6<A, B, C, D, E, F>

Source§

type Error = Box<dyn Error + Send + Sync>

Source§

async fn connect(&self, path: PathBuf) -> Result<UnixStream, Self::Error>

Source§

impl<A, B, C, D, E, F, G> UnixStreamConnector for Either7<A, B, C, D, E, F, G>

Source§

type Error = Box<dyn Error + Send + Sync>

Source§

async fn connect(&self, path: PathBuf) -> Result<UnixStream, Self::Error>

Source§

impl<A, B, C, D, E, F, G, H> UnixStreamConnector for Either8<A, B, C, D, E, F, G, H>

Source§

type Error = Box<dyn Error + Send + Sync>

Source§

async fn connect(&self, path: PathBuf) -> Result<UnixStream, Self::Error>

Source§

impl<A, B, C, D, E, F, G, H, I> UnixStreamConnector for Either9<A, B, C, D, E, F, G, H, I>

Source§

type Error = Box<dyn Error + Send + Sync>

Source§

async fn connect(&self, path: PathBuf) -> Result<UnixStream, Self::Error>

Source§

impl<T: UnixStreamConnector> UnixStreamConnector for Arc<T>

Source§

type Error = <T as UnixStreamConnector>::Error

Source§

fn connect( &self, path: PathBuf, ) -> impl Future<Output = Result<UnixStream, Self::Error>> + Send + '_

Implementors§