pub trait PubSubInterface:
Send
+ Sync
+ Any {
type Error: Error + Send + Sync + 'static;
// Required methods
fn topic_subscribe<'life0, 'life1, 'async_trait>(
&'life0 mut self,
topic: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Arc<dyn PubSubTopic<Error = GuardianError>>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn as_any(&self) -> &dyn Any;
}Expand description
Trait principal do sistema pub/sub.
Required Associated Types§
Required Methods§
Sourcefn topic_subscribe<'life0, 'life1, 'async_trait>(
&'life0 mut self,
topic: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Arc<dyn PubSubTopic<Error = GuardianError>>, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn topic_subscribe<'life0, 'life1, 'async_trait>(
&'life0 mut self,
topic: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Arc<dyn PubSubTopic<Error = GuardianError>>, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Inscreve-se em um tópico.
Implementors§
Source§impl PubSubInterface for IrohPubSub
impl PubSubInterface for IrohPubSub
type Error = GuardianError
Source§impl PubSubInterface for RawPubSub
Implementação da interface PubSub usando ipfs_core_api
impl PubSubInterface for RawPubSub
Implementação da interface PubSub usando ipfs_core_api