pub trait Publish:
'static
+ Send
+ Sync
+ Debug {
// Required methods
fn publish_ops(
&self,
op_ids: Vec<OpId>,
target: Url,
) -> BoxFut<'_, K2Result<()>>;
fn publish_agent(
&self,
agent_info: Arc<AgentInfoSigned>,
target: Url,
) -> BoxFut<'_, K2Result<()>>;
}Expand description
Trait for implementing a publish module to publish ops to other peers.
Required Methods§
Sourcefn publish_ops(
&self,
op_ids: Vec<OpId>,
target: Url,
) -> BoxFut<'_, K2Result<()>>
fn publish_ops( &self, op_ids: Vec<OpId>, target: Url, ) -> BoxFut<'_, K2Result<()>>
Add op ids to be published to a peer.
Sourcefn publish_agent(
&self,
agent_info: Arc<AgentInfoSigned>,
target: Url,
) -> BoxFut<'_, K2Result<()>>
fn publish_agent( &self, agent_info: Arc<AgentInfoSigned>, target: Url, ) -> BoxFut<'_, K2Result<()>>
Add agent info to be published to a peer.