pub trait ClusterNode {
type NodeType: Debug;
type NodeIdType: Display + Clone + Debug + PartialEq + From<String> + Eq + Hash + Send + Sync;
// Required methods
fn send_message<'life0, 'async_trait>(
&'life0 self,
msg: Message<Self>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: Sized + 'async_trait,
'life0: 'async_trait;
fn node_id(&self) -> &Self::NodeIdType;
}Expand description
A Cluster node
Required Associated Types§
Required Methods§
Sourcefn send_message<'life0, 'async_trait>(
&'life0 self,
msg: Message<Self>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: Sized + 'async_trait,
'life0: 'async_trait,
fn send_message<'life0, 'async_trait>(
&'life0 self,
msg: Message<Self>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: Sized + 'async_trait,
'life0: 'async_trait,
send messages to the node
Sourcefn node_id(&self) -> &Self::NodeIdType
fn node_id(&self) -> &Self::NodeIdType
unique node identifier