PubSubInterface

Trait PubSubInterface 

Source
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§

Source

type Error: Error + Send + Sync + 'static

Required Methods§

Source

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.

Source

fn as_any(&self) -> &dyn Any

Método auxiliar para downcast

Implementors§