Trait holochain_sqlite::store::AsP2pStateReadExt

source ·
pub trait AsP2pStateReadExt {
    // Required methods
    fn p2p_get_agent<'life0, 'life1, 'async_trait>(
        &'life0 self,
        agent: &'life1 KitsuneAgent
    ) -> Pin<Box<dyn Future<Output = DatabaseResult<Option<AgentInfoSigned>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn p2p_list_agents<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = DatabaseResult<Vec<AgentInfoSigned>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn p2p_count_agents<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = DatabaseResult<u32>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn p2p_gossip_query_agents<'life0, 'async_trait>(
        &'life0 self,
        since_ms: u64,
        until_ms: u64,
        arcset: DhtArcSet
    ) -> Pin<Box<dyn Future<Output = DatabaseResult<Vec<AgentInfoSigned>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn p2p_query_near_basis<'life0, 'async_trait>(
        &'life0 self,
        basis: u32,
        limit: u32
    ) -> Pin<Box<dyn Future<Output = DatabaseResult<Vec<AgentInfoSigned>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn p2p_extrapolated_coverage<'life0, 'async_trait>(
        &'life0 self,
        dht_arc_set: DhtArcSet
    ) -> Pin<Box<dyn Future<Output = DatabaseResult<Vec<f64>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Extension trait to treat database read handles as p2p store accessors.

Required Methods§

source

fn p2p_get_agent<'life0, 'life1, 'async_trait>( &'life0 self, agent: &'life1 KitsuneAgent ) -> Pin<Box<dyn Future<Output = DatabaseResult<Option<AgentInfoSigned>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get an AgentInfoSigned record from the p2p_store

source

fn p2p_list_agents<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = DatabaseResult<Vec<AgentInfoSigned>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

List all AgentInfoSigned records within a space in the p2p_agent_store

source

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

Count agent records within a space in the p2p_agent_store

source

fn p2p_gossip_query_agents<'life0, 'async_trait>( &'life0 self, since_ms: u64, until_ms: u64, arcset: DhtArcSet ) -> Pin<Box<dyn Future<Output = DatabaseResult<Vec<AgentInfoSigned>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Query agent list for gossip

source

fn p2p_query_near_basis<'life0, 'async_trait>( &'life0 self, basis: u32, limit: u32 ) -> Pin<Box<dyn Future<Output = DatabaseResult<Vec<AgentInfoSigned>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Query agents sorted by nearness to basis loc

source

fn p2p_extrapolated_coverage<'life0, 'async_trait>( &'life0 self, dht_arc_set: DhtArcSet ) -> Pin<Box<dyn Future<Output = DatabaseResult<Vec<f64>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Extrapolate coverage from agents within our own storage arc

Implementors§