pub trait Fetch:
'static
+ Send
+ Sync
+ Debug {
// Required methods
fn request_ops(
&self,
op_ids: Vec<OpId>,
source: Url,
) -> BoxFut<'_, K2Result<()>>;
fn get_state_summary(&self) -> BoxFut<'_, K2Result<FetchStateSummary>>;
}Expand description
Trait for implementing a fetch module to fetch ops from other agents.
Required Methods§
Sourcefn request_ops(
&self,
op_ids: Vec<OpId>,
source: Url,
) -> BoxFut<'_, K2Result<()>>
fn request_ops( &self, op_ids: Vec<OpId>, source: Url, ) -> BoxFut<'_, K2Result<()>>
Add op ids to be fetched from a peer.
Sourcefn get_state_summary(&self) -> BoxFut<'_, K2Result<FetchStateSummary>>
fn get_state_summary(&self) -> BoxFut<'_, K2Result<FetchStateSummary>>
Get a state summary from the fetch module.