Skip to main content

MeshSession

Trait MeshSession 

Source
pub trait MeshSession: Send + Sync {
    // Required methods
    fn is_ready(&self) -> bool;
    fn is_connected(&self) -> bool;
    fn htl_config(&self) -> PeerHTLConfig;
    fn request<'life0, 'life1, 'async_trait>(
        &'life0 self,
        hash_hex: &'life1 str,
        timeout: Duration,
    ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn query_nostr_events<'life0, 'async_trait>(
        &'life0 self,
        filters: Vec<Filter>,
        timeout: Duration,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Event>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn send_mesh_frame_text<'life0, 'life1, 'async_trait>(
        &'life0 self,
        frame: &'life1 MeshNostrFrame,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn close<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;

    // Provided method
    fn transport_debug_state(&self) -> Option<String> { ... }
}

Required Methods§

Source

fn is_ready(&self) -> bool

Source

fn is_connected(&self) -> bool

Source

fn htl_config(&self) -> PeerHTLConfig

Source

fn request<'life0, 'life1, 'async_trait>( &'life0 self, hash_hex: &'life1 str, timeout: Duration, ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn query_nostr_events<'life0, 'async_trait>( &'life0 self, filters: Vec<Filter>, timeout: Duration, ) -> Pin<Box<dyn Future<Output = Result<Vec<Event>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn send_mesh_frame_text<'life0, 'life1, 'async_trait>( &'life0 self, frame: &'life1 MeshNostrFrame, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

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

Provided Methods§

Implementors§