pub trait AbstractPtMgr: Send + Sync {
// Required method
fn factory_for_transport<'life0, 'life1, 'async_trait>(
&'life0 self,
transport: &'life1 PtTransportName,
) -> Pin<Box<dyn Future<Output = Result<Option<Arc<dyn ChannelFactory + Send + Sync>>, Arc<dyn AbstractPtError>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}
Expand description
A pluggable transport manager.
We can’t directly reference the PtMgr
type from tor-ptmgr
, because of dependency resolution
constraints, so this defines the interface for what one should look like.
Required Methods§
Sourcefn factory_for_transport<'life0, 'life1, 'async_trait>(
&'life0 self,
transport: &'life1 PtTransportName,
) -> Pin<Box<dyn Future<Output = Result<Option<Arc<dyn ChannelFactory + Send + Sync>>, Arc<dyn AbstractPtError>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn factory_for_transport<'life0, 'life1, 'async_trait>(
&'life0 self,
transport: &'life1 PtTransportName,
) -> Pin<Box<dyn Future<Output = Result<Option<Arc<dyn ChannelFactory + Send + Sync>>, Arc<dyn AbstractPtError>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get a ChannelFactory
for the provided PtTransportName
.