Skip to main content

LocalNostrBus

Trait LocalNostrBus 

Source
pub trait LocalNostrBus: Send + Sync {
    // Required methods
    fn source_name(&self) -> &'static str;
    fn broadcast_event<'life0, 'life1, 'async_trait>(
        &'life0 self,
        event: &'life1 Event,
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             Self: 'async_trait;
    fn query_root<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        owner_pubkey: &'life1 str,
        tree_name: &'life2 str,
        timeout: Duration,
    ) -> Pin<Box<dyn Future<Output = Option<PeerRootEvent>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             Self: 'async_trait;
}

Required Methods§

Source

fn source_name(&self) -> &'static str

Source

fn broadcast_event<'life0, 'life1, 'async_trait>( &'life0 self, event: &'life1 Event, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Source

fn query_root<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, owner_pubkey: &'life1 str, tree_name: &'life2 str, timeout: Duration, ) -> Pin<Box<dyn Future<Output = Option<PeerRootEvent>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, Self: 'async_trait,

Implementors§