ouisync

Trait DhtContactsStoreTrait

Source
pub trait DhtContactsStoreTrait:
    Sync
    + Send
    + 'static {
    // Required methods
    fn load_v4<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<HashSet<SocketAddrV4>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn load_v6<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<HashSet<SocketAddrV6>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn store_v4<'life0, 'async_trait>(
        &'life0 self,
        contacts: HashSet<SocketAddrV4>,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn store_v6<'life0, 'async_trait>(
        &'life0 self,
        contacts: HashSet<SocketAddrV6>,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}

Required Methods§

Source

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

Source

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

Source

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

Source

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

Implementors§