pub trait ObjectSafeConnector: Send + Sync + 'static {
    // Required methods
    fn connect<'life0, 'life1, 'async_trait>(
        &'life0 self,
        url: &'life1 Url
    ) -> Pin<Box<dyn Future<Output = Result<BoxedTransport>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn spawn(&self, fut: Pin<Box<dyn Future<Output = ()> + Send + 'static>>);

    // Provided methods
    fn boxed(self) -> Box<dyn ObjectSafeConnector>
       where Self: Sized { ... }
    fn arced(self) -> Arc<dyn ObjectSafeConnector>
       where Self: Sized { ... }
}
Expand description

Required Methods§

source

fn connect<'life0, 'life1, 'async_trait>( &'life0 self, url: &'life1 Url ) -> Pin<Box<dyn Future<Output = Result<BoxedTransport>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source

fn spawn(&self, fut: Pin<Box<dyn Future<Output = ()> + Send + 'static>>)

Provided Methods§

source

fn boxed(self) -> Box<dyn ObjectSafeConnector>
where Self: Sized,

source

fn arced(self) -> Arc<dyn ObjectSafeConnector>
where Self: Sized,

Trait Implementations§

source§

impl Connector for Box<dyn ObjectSafeConnector>

§

type Transport = BoxedTransport

source§

fn connect<'life0, 'life1, 'async_trait>( &'life0 self, url: &'life1 Url ) -> Pin<Box<dyn Future<Output = Result<BoxedTransport>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Initiate a connection to the provided url Read more
source§

fn spawn<Fut: Future<Output = ()> + Send + 'static>(&self, fut: Fut)

source§

impl Debug for dyn ObjectSafeConnector

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Implementors§