Trait holochain::prelude::KitsuneHost
source · pub trait KitsuneHost: 'static + Send + Sync {
fn get_agent_info_signed(
&self,
input: GetAgentInfoSignedEvt
) -> MustBoxFuture<'_, Result<Option<AgentInfoSigned>, Box<dyn Error + Sync + Send + 'static, Global>>>ⓘNotable traits for MustBoxFuture<'lt, T>impl<'lt, T> Future for MustBoxFuture<'lt, T> type Output = T;
;
fn peer_extrapolated_coverage(
&self,
space: Arc<KitsuneSpace>,
dht_arc_set: DhtArcSet
) -> MustBoxFuture<'_, Result<Vec<f64, Global>, Box<dyn Error + Sync + Send + 'static, Global>>>ⓘNotable traits for MustBoxFuture<'lt, T>impl<'lt, T> Future for MustBoxFuture<'lt, T> type Output = T;
;
fn query_region_set(
&self,
space: Arc<KitsuneSpace>,
dht_arc_set: Arc<DhtArcSet>
) -> MustBoxFuture<'_, Result<RegionSetLtcs<RegionData>, Box<dyn Error + Sync + Send + 'static, Global>>>ⓘNotable traits for MustBoxFuture<'lt, T>impl<'lt, T> Future for MustBoxFuture<'lt, T> type Output = T;
;
fn query_size_limited_regions(
&self,
space: Arc<KitsuneSpace>,
size_limit: u32,
regions: Vec<Region<RegionData>, Global>
) -> MustBoxFuture<'_, Result<Vec<Region<RegionData>, Global>, Box<dyn Error + Sync + Send + 'static, Global>>>ⓘNotable traits for MustBoxFuture<'lt, T>impl<'lt, T> Future for MustBoxFuture<'lt, T> type Output = T;
;
fn record_metrics(
&self,
space: Arc<KitsuneSpace>,
records: Vec<MetricRecord, Global>
) -> MustBoxFuture<'_, Result<(), Box<dyn Error + Sync + Send + 'static, Global>>>ⓘNotable traits for MustBoxFuture<'lt, T>impl<'lt, T> Future for MustBoxFuture<'lt, T> type Output = T;
;
fn get_topology(
&self,
space: Arc<KitsuneSpace>
) -> MustBoxFuture<'_, Result<Topology, Box<dyn Error + Sync + Send + 'static, Global>>>ⓘNotable traits for MustBoxFuture<'lt, T>impl<'lt, T> Future for MustBoxFuture<'lt, T> type Output = T;
;
}
Expand description
The interface to be implemented by the host, which handles various requests for data
Required Methods
sourcefn get_agent_info_signed(
&self,
input: GetAgentInfoSignedEvt
) -> MustBoxFuture<'_, Result<Option<AgentInfoSigned>, Box<dyn Error + Sync + Send + 'static, Global>>>ⓘNotable traits for MustBoxFuture<'lt, T>impl<'lt, T> Future for MustBoxFuture<'lt, T> type Output = T;
fn get_agent_info_signed(
&self,
input: GetAgentInfoSignedEvt
) -> MustBoxFuture<'_, Result<Option<AgentInfoSigned>, Box<dyn Error + Sync + Send + 'static, Global>>>ⓘNotable traits for MustBoxFuture<'lt, T>impl<'lt, T> Future for MustBoxFuture<'lt, T> type Output = T;
We need to get previously stored agent info.
sourcefn peer_extrapolated_coverage(
&self,
space: Arc<KitsuneSpace>,
dht_arc_set: DhtArcSet
) -> MustBoxFuture<'_, Result<Vec<f64, Global>, Box<dyn Error + Sync + Send + 'static, Global>>>ⓘNotable traits for MustBoxFuture<'lt, T>impl<'lt, T> Future for MustBoxFuture<'lt, T> type Output = T;
fn peer_extrapolated_coverage(
&self,
space: Arc<KitsuneSpace>,
dht_arc_set: DhtArcSet
) -> MustBoxFuture<'_, Result<Vec<f64, Global>, Box<dyn Error + Sync + Send + 'static, Global>>>ⓘNotable traits for MustBoxFuture<'lt, T>impl<'lt, T> Future for MustBoxFuture<'lt, T> type Output = T;
Extrapolated Peer Coverage
sourcefn query_region_set(
&self,
space: Arc<KitsuneSpace>,
dht_arc_set: Arc<DhtArcSet>
) -> MustBoxFuture<'_, Result<RegionSetLtcs<RegionData>, Box<dyn Error + Sync + Send + 'static, Global>>>ⓘNotable traits for MustBoxFuture<'lt, T>impl<'lt, T> Future for MustBoxFuture<'lt, T> type Output = T;
fn query_region_set(
&self,
space: Arc<KitsuneSpace>,
dht_arc_set: Arc<DhtArcSet>
) -> MustBoxFuture<'_, Result<RegionSetLtcs<RegionData>, Box<dyn Error + Sync + Send + 'static, Global>>>ⓘNotable traits for MustBoxFuture<'lt, T>impl<'lt, T> Future for MustBoxFuture<'lt, T> type Output = T;
Query aggregate dht op data to form an LTCS set of region data
sourcefn query_size_limited_regions(
&self,
space: Arc<KitsuneSpace>,
size_limit: u32,
regions: Vec<Region<RegionData>, Global>
) -> MustBoxFuture<'_, Result<Vec<Region<RegionData>, Global>, Box<dyn Error + Sync + Send + 'static, Global>>>ⓘNotable traits for MustBoxFuture<'lt, T>impl<'lt, T> Future for MustBoxFuture<'lt, T> type Output = T;
fn query_size_limited_regions(
&self,
space: Arc<KitsuneSpace>,
size_limit: u32,
regions: Vec<Region<RegionData>, Global>
) -> MustBoxFuture<'_, Result<Vec<Region<RegionData>, Global>, Box<dyn Error + Sync + Send + 'static, Global>>>ⓘNotable traits for MustBoxFuture<'lt, T>impl<'lt, T> Future for MustBoxFuture<'lt, T> type Output = T;
Given an input list of regions, return a list of equal or greater length
such that each region’s size is less than the size_limit
, by recursively
subdividing regions which are over the size limit.
sourcefn record_metrics(
&self,
space: Arc<KitsuneSpace>,
records: Vec<MetricRecord, Global>
) -> MustBoxFuture<'_, Result<(), Box<dyn Error + Sync + Send + 'static, Global>>>ⓘNotable traits for MustBoxFuture<'lt, T>impl<'lt, T> Future for MustBoxFuture<'lt, T> type Output = T;
fn record_metrics(
&self,
space: Arc<KitsuneSpace>,
records: Vec<MetricRecord, Global>
) -> MustBoxFuture<'_, Result<(), Box<dyn Error + Sync + Send + 'static, Global>>>ⓘNotable traits for MustBoxFuture<'lt, T>impl<'lt, T> Future for MustBoxFuture<'lt, T> type Output = T;
Record a set of metric records
sourcefn get_topology(
&self,
space: Arc<KitsuneSpace>
) -> MustBoxFuture<'_, Result<Topology, Box<dyn Error + Sync + Send + 'static, Global>>>ⓘNotable traits for MustBoxFuture<'lt, T>impl<'lt, T> Future for MustBoxFuture<'lt, T> type Output = T;
fn get_topology(
&self,
space: Arc<KitsuneSpace>
) -> MustBoxFuture<'_, Result<Topology, Box<dyn Error + Sync + Send + 'static, Global>>>ⓘNotable traits for MustBoxFuture<'lt, T>impl<'lt, T> Future for MustBoxFuture<'lt, T> type Output = T;
Get the quantum Topology associated with this Space