pub struct CommunicationManager { /* private fields */ }
Expand description
Communication manager for coordinating distributed operations
Implementations§
Source§impl CommunicationManager
impl CommunicationManager
Sourcepub fn add_endpoint(&mut self, endpoint: CommunicationEndpoint)
pub fn add_endpoint(&mut self, endpoint: CommunicationEndpoint)
Add a communication endpoint
Sourcepub fn broadcast(&self, message: DistributedMessage) -> CoreResult<()>
pub fn broadcast(&self, message: DistributedMessage) -> CoreResult<()>
Broadcast a message to all nodes
Sourcepub fn send_to(
&self,
nodeid: &str,
message: DistributedMessage,
) -> CoreResult<()>
pub fn send_to( &self, nodeid: &str, message: DistributedMessage, ) -> CoreResult<()>
Send a message to a specific node
Sourcepub fn process_all_messages(&self) -> CoreResult<()>
pub fn process_all_messages(&self) -> CoreResult<()>
Process all pending messages
Sourcepub fn local_nodeid(&self) -> &str
pub fn local_nodeid(&self) -> &str
Get local node ID
Auto Trait Implementations§
impl Freeze for CommunicationManager
impl RefUnwindSafe for CommunicationManager
impl Send for CommunicationManager
impl Sync for CommunicationManager
impl Unpin for CommunicationManager
impl UnwindSafe for CommunicationManager
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> 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