pub fn new<F, R>(connect_func: F) -> Self
    where
        F: Fn() -> R + Send + Sync + 'static,
        R: Future<Output = Result<IO, std::io::Error>> + Send + Sync + 'static,
    {
        Self {
            connect: Arc::new(move || Box::pin(connect_func())),
        }
    }
/// Create a new connector with this factory function
Create a new connector with this factory function
Create a new connector with this factory function
pub fn new<F, R>(connect_func: F) -> Self
    where
        F: Fn() -> R + Send + Sync + 'static,
        R: Future<Output = Result<IO, std::io::Error>> + Send + Sync + 'static,
    {
        Self {
            connect: Arc::new(move || Box::pin(connect_func())),
        }
    }
pub fn new < F , R > ( connect_func : F ) -> Self where F : Fn ( ) -> R + Send + Sync + ' static , R : Future < Output = Result < IO , std :: io :: Error > > + Send + Sync + ' static , { Self { connect : Arc :: new ( move | | Box :: pin ( connect_func ( ) ) ) , } }
Create a new connector with this factory function
Create a new connector with this factory function
connect_func
F
connect_func
F