Trait holochain::prelude::kitsune_p2p::KitsuneHostDefaultError
source · pub trait KitsuneHostDefaultError: KitsuneHost {
const NAME: &'static str;
fn get_agent_info_signed(
&self,
_input: GetAgentInfoSignedEvt
) -> MustBoxFuture<'_, Result<Option<AgentInfoSigned>, Box<dyn Error + Sync + Send + 'static, Global>>> ⓘ { ... }
fn peer_extrapolated_coverage(
&self,
_space: Arc<KitsuneSpace>,
_dht_arc_set: DhtArcSet
) -> MustBoxFuture<'_, Result<Vec<f64, Global>, Box<dyn Error + Sync + Send + 'static, Global>>> ⓘ { ... }
fn record_metrics(
&self,
_space: Arc<KitsuneSpace>,
_records: Vec<MetricRecord, Global>
) -> MustBoxFuture<'_, Result<(), Box<dyn Error + Sync + Send + 'static, Global>>> ⓘ { ... }
fn query_region_set(
&self,
_space: Arc<KitsuneSpace>,
_dht_arc_set: Arc<DhtArcSet>
) -> MustBoxFuture<'_, Result<RegionSetLtcs<RegionData>, Box<dyn Error + Sync + Send + 'static, Global>>> ⓘ { ... }
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>>> ⓘ { ... }
fn get_topology(
&self,
_space: Arc<KitsuneSpace>
) -> MustBoxFuture<'_, Result<Topology, Box<dyn Error + Sync + Send + 'static, Global>>> ⓘ { ... }
}
Expand description
A supertrait of KitsuneHost convenient for defining test handlers. Allows only specifying the methods you care about, and letting all the rest throw errors if called
Required Associated Constants
Provided Methods
fn get_agent_info_signed(
&self,
_input: GetAgentInfoSignedEvt
) -> MustBoxFuture<'_, Result<Option<AgentInfoSigned>, Box<dyn Error + Sync + Send + 'static, Global>>> ⓘ
fn peer_extrapolated_coverage(
&self,
_space: Arc<KitsuneSpace>,
_dht_arc_set: DhtArcSet
) -> MustBoxFuture<'_, Result<Vec<f64, Global>, Box<dyn Error + Sync + Send + 'static, Global>>> ⓘ
fn record_metrics(
&self,
_space: Arc<KitsuneSpace>,
_records: Vec<MetricRecord, Global>
) -> MustBoxFuture<'_, Result<(), Box<dyn Error + Sync + Send + 'static, Global>>> ⓘ
fn query_region_set(
&self,
_space: Arc<KitsuneSpace>,
_dht_arc_set: Arc<DhtArcSet>
) -> MustBoxFuture<'_, Result<RegionSetLtcs<RegionData>, Box<dyn Error + Sync + Send + 'static, Global>>> ⓘ
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>>> ⓘ
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>>> ⓘ
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.