Trait UnixStreamConnector

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

    // Required method
    fn connect(
        &self,
        path: PathBuf,
    ) -> impl Future<Output = Result<UnixStream, Self::Error>> + Send;
}
Expand description

Trait used by the UnixConnector to actually establish the UnixStream.

Required Associated Types§

type Error

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

Required Methods§

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§

§

impl UnixStreamConnector for ()

§

type Error = Error

§

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

§

impl<T> UnixStreamConnector for Arc<T>

§

type Error = <T as UnixStreamConnector>::Error

§

fn connect( &self, path: PathBuf, ) -> impl Future<Output = Result<UnixStream, <Arc<T> as UnixStreamConnector>::Error>> + Send

Implementors§

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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