pub struct GossipSyncEngine { /* private fields */ }Expand description
Push-pull gossip engine for in-process synchronization tests and example flows.
Implementations§
Source§impl GossipSyncEngine
impl GossipSyncEngine
pub fn new(local_peer_id: impl Into<String>, config: GossipConfig) -> Self
pub fn peers(&self) -> &[PeerAddress] ⓘ
pub fn config(&self) -> &GossipConfig
pub fn local_peer_id(&self) -> &str
pub fn has_gene(&self, gene_id: &str) -> bool
pub fn gene_version(&self, gene_id: &str) -> Option<u64>
pub fn register_envelope(&self, envelope: EvolutionEnvelope) -> usize
pub fn build_digest(&self) -> GossipDigest
pub fn build_fetch_query_for_digest(&self, digest: &GossipDigest) -> FetchQuery
pub fn respond_to_fetch(&self, query: &FetchQuery) -> FetchResponse
pub fn apply_fetch_response(&self, response: &FetchResponse) -> Vec<String>
pub async fn sync_once_with( &self, remote: &GossipSyncEngine, ) -> GossipSyncReport
pub async fn start_sync_loop(self) -> JoinHandle<()>
pub fn serialize_digest_json(digest: &GossipDigest) -> Result<Vec<u8>, Error>
Auto Trait Implementations§
impl !Freeze for GossipSyncEngine
impl RefUnwindSafe for GossipSyncEngine
impl Send for GossipSyncEngine
impl Sync for GossipSyncEngine
impl Unpin for GossipSyncEngine
impl UnsafeUnpin for GossipSyncEngine
impl UnwindSafe for GossipSyncEngine
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more