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§
Provided Methods§
sourcefn boxed(self) -> Box<dyn ObjectSafeConnector>where
Self: Sized,
fn boxed(self) -> Box<dyn ObjectSafeConnector>where
Self: Sized,
sourcefn arced(self) -> Arc<dyn ObjectSafeConnector>where
Self: Sized,
fn arced(self) -> Arc<dyn ObjectSafeConnector>where
Self: Sized,
Trait Implementations§
source§impl Connector for Box<dyn ObjectSafeConnector>
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,
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