pub trait KitsuneHostDefaultError: KitsuneHost + FetchPoolConfig {
    const NAME: &'static str;
Show 14 methods // Provided methods fn block( &self, _input: Block ) -> MustBoxFuture<'_, Result<(), Box<dyn Error + Send + Sync + 'static, Global>>> { ... } fn unblock( &self, _input: Block ) -> MustBoxFuture<'_, Result<(), Box<dyn Error + Send + Sync + 'static, Global>>> { ... } fn is_blocked( &self, _input: BlockTargetId, _timestamp: Timestamp ) -> MustBoxFuture<'_, Result<bool, Box<dyn Error + Send + Sync + 'static, Global>>> { ... } fn put_agent_info_signed( &self, _input: Vec<AgentInfoSigned, Global> ) -> MustBoxFuture<'_, Result<(), Box<dyn Error + Send + Sync + 'static, Global>>> { ... } fn get_agent_info_signed( &self, _input: GetAgentInfoSignedEvt ) -> MustBoxFuture<'_, Result<Option<AgentInfoSigned>, Box<dyn Error + Send + Sync + 'static, Global>>> { ... } fn remove_agent_info_signed( &self, _input: GetAgentInfoSignedEvt ) -> MustBoxFuture<'_, Result<bool, Box<dyn Error + Send + Sync + 'static, Global>>> { ... } fn peer_extrapolated_coverage( &self, _space: Arc<KitsuneSpace>, _dht_arc_set: DhtArcSet ) -> MustBoxFuture<'_, Result<Vec<f64, Global>, Box<dyn Error + Send + Sync + 'static, Global>>> { ... } fn record_metrics( &self, _space: Arc<KitsuneSpace>, _records: Vec<MetricRecord, Global> ) -> MustBoxFuture<'_, Result<(), Box<dyn Error + Send + Sync + 'static, Global>>> { ... } fn query_region_set( &self, _space: Arc<KitsuneSpace>, _dht_arc_set: Arc<DhtArcSet> ) -> MustBoxFuture<'_, Result<RegionSetLtcs<RegionData>, Box<dyn Error + Send + Sync + '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 + Send + Sync + 'static, Global>>> { ... } fn get_topology( &self, _space: Arc<KitsuneSpace> ) -> MustBoxFuture<'_, Result<Topology, Box<dyn Error + Send + Sync + 'static, Global>>> { ... } fn op_hash( &self, _op_data: Arc<KitsuneOpData> ) -> MustBoxFuture<'_, Result<Arc<KitsuneOpHash>, Box<dyn Error + Send + Sync + 'static, Global>>> { ... } fn query_op_hashes_by_region( &self, _space: Arc<KitsuneSpace>, _region: RegionCoords ) -> MustBoxFuture<'_, Result<Vec<RoughSized<Arc<KitsuneOpHash>>, Global>, Box<dyn Error + Send + Sync + 'static, Global>>> { ... } fn merge_fetch_contexts(&self, _a: u32, _b: u32) -> u32 { ... }
}
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§

source

const NAME: &'static str

Name to be printed out on unimplemented error

Provided Methods§

source

fn block( &self, _input: Block ) -> MustBoxFuture<'_, Result<(), Box<dyn Error + Send + Sync + 'static, Global>>>

source

fn unblock( &self, _input: Block ) -> MustBoxFuture<'_, Result<(), Box<dyn Error + Send + Sync + 'static, Global>>>

source

fn is_blocked( &self, _input: BlockTargetId, _timestamp: Timestamp ) -> MustBoxFuture<'_, Result<bool, Box<dyn Error + Send + Sync + 'static, Global>>>

source

fn put_agent_info_signed( &self, _input: Vec<AgentInfoSigned, Global> ) -> MustBoxFuture<'_, Result<(), Box<dyn Error + Send + Sync + 'static, Global>>>

source

fn get_agent_info_signed( &self, _input: GetAgentInfoSignedEvt ) -> MustBoxFuture<'_, Result<Option<AgentInfoSigned>, Box<dyn Error + Send + Sync + 'static, Global>>>

source

fn remove_agent_info_signed( &self, _input: GetAgentInfoSignedEvt ) -> MustBoxFuture<'_, Result<bool, Box<dyn Error + Send + Sync + 'static, Global>>>

source

fn peer_extrapolated_coverage( &self, _space: Arc<KitsuneSpace>, _dht_arc_set: DhtArcSet ) -> MustBoxFuture<'_, Result<Vec<f64, Global>, Box<dyn Error + Send + Sync + 'static, Global>>>

source

fn record_metrics( &self, _space: Arc<KitsuneSpace>, _records: Vec<MetricRecord, Global> ) -> MustBoxFuture<'_, Result<(), Box<dyn Error + Send + Sync + 'static, Global>>>

source

fn query_region_set( &self, _space: Arc<KitsuneSpace>, _dht_arc_set: Arc<DhtArcSet> ) -> MustBoxFuture<'_, Result<RegionSetLtcs<RegionData>, Box<dyn Error + Send + Sync + 'static, Global>>>

source

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 + Send + Sync + '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.

source

fn get_topology( &self, _space: Arc<KitsuneSpace> ) -> MustBoxFuture<'_, Result<Topology, Box<dyn Error + Send + Sync + 'static, Global>>>

source

fn op_hash( &self, _op_data: Arc<KitsuneOpData> ) -> MustBoxFuture<'_, Result<Arc<KitsuneOpHash>, Box<dyn Error + Send + Sync + 'static, Global>>>

source

fn query_op_hashes_by_region( &self, _space: Arc<KitsuneSpace>, _region: RegionCoords ) -> MustBoxFuture<'_, Result<Vec<RoughSized<Arc<KitsuneOpHash>>, Global>, Box<dyn Error + Send + Sync + 'static, Global>>>

source

fn merge_fetch_contexts(&self, _a: u32, _b: u32) -> u32

Implementors§