pub struct PushPullGossipSyncEngine { /* private fields */ }Available on crate feature
evolution-network-experimental only.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, ) -> GossipSyncEngine
pub fn peers(&self) -> &[String]
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more