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, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
fn spawn(&self, fut: Pin<Box<dyn Future<Output = ()> + Send>>);
// 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§
fn boxed(self) -> Box<dyn ObjectSafeConnector>where
Self: Sized,
fn boxed(self) -> Box<dyn ObjectSafeConnector>where
Self: Sized,
fn arced(self) -> Arc<dyn ObjectSafeConnector>where
Self: Sized,
fn arced(self) -> Arc<dyn ObjectSafeConnector>where
Self: Sized,
Trait Implementations§
§impl Connector for Box<dyn ObjectSafeConnector>
impl Connector for Box<dyn ObjectSafeConnector>
type Transport = BoxedTransport
§fn connect<'life0, 'life1, 'async_trait>(
&'life0 self,
url: &'life1 Url,
) -> Pin<Box<dyn Future<Output = Result<BoxedTransport, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Box<dyn ObjectSafeConnector>: 'async_trait,
fn connect<'life0, 'life1, 'async_trait>(
&'life0 self,
url: &'life1 Url,
) -> Pin<Box<dyn Future<Output = Result<BoxedTransport, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Box<dyn ObjectSafeConnector>: 'async_trait,
Initiate a connection to the provided url Read more