Trait holochain_state::prelude::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 = Result<Option<AgentInfoSigned>, DatabaseError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
fn p2p_list_agents<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<Vec<AgentInfoSigned>, DatabaseError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn p2p_count_agents<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<u32, DatabaseError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: '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 = Result<Vec<AgentInfoSigned>, DatabaseError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn p2p_query_near_basis<'life0, 'async_trait>(
&'life0 self,
basis: u32,
limit: u32
) -> Pin<Box<dyn Future<Output = Result<Vec<AgentInfoSigned>, DatabaseError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn p2p_extrapolated_coverage<'life0, 'async_trait>(
&'life0 self,
dht_arc_set: DhtArcSet
) -> Pin<Box<dyn Future<Output = Result<Vec<f64>, DatabaseError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
}
Expand description
Extension trait to treat database read handles as p2p store accessors.
Required Methods§
sourcefn p2p_get_agent<'life0, 'life1, 'async_trait>(
&'life0 self,
agent: &'life1 KitsuneAgent
) -> Pin<Box<dyn Future<Output = Result<Option<AgentInfoSigned>, DatabaseError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn p2p_get_agent<'life0, 'life1, 'async_trait>(
&'life0 self,
agent: &'life1 KitsuneAgent
) -> Pin<Box<dyn Future<Output = Result<Option<AgentInfoSigned>, DatabaseError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Get an AgentInfoSigned record from the p2p_store
sourcefn p2p_list_agents<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<Vec<AgentInfoSigned>, DatabaseError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn p2p_list_agents<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<Vec<AgentInfoSigned>, DatabaseError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
List all AgentInfoSigned records within a space in the p2p_agent_store
sourcefn p2p_count_agents<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<u32, DatabaseError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn p2p_count_agents<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<u32, DatabaseError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Count agent records within a space in the p2p_agent_store
sourcefn p2p_gossip_query_agents<'life0, 'async_trait>(
&'life0 self,
since_ms: u64,
until_ms: u64,
arcset: DhtArcSet
) -> Pin<Box<dyn Future<Output = Result<Vec<AgentInfoSigned>, DatabaseError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: '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 = Result<Vec<AgentInfoSigned>, DatabaseError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Query agent list for gossip
sourcefn p2p_query_near_basis<'life0, 'async_trait>(
&'life0 self,
basis: u32,
limit: u32
) -> Pin<Box<dyn Future<Output = Result<Vec<AgentInfoSigned>, DatabaseError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn p2p_query_near_basis<'life0, 'async_trait>(
&'life0 self,
basis: u32,
limit: u32
) -> Pin<Box<dyn Future<Output = Result<Vec<AgentInfoSigned>, DatabaseError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Query agents sorted by nearness to basis loc