Trait rings_node::prelude::message::HandleMsg
source · pub trait HandleMsg<T> {
// Required method
fn handle<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 MessagePayload<Message>,
msg: &'life2 T
) -> Pin<Box<dyn Future<Output = Result<Vec<MessageHandlerEvent, Global>, Error>> + Send + 'async_trait, Global>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait;
}
Expand description
Generic trait for handle message ,inspired by Actor-Model.
Required Methods§
sourcefn handle<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 MessagePayload<Message>,
msg: &'life2 T
) -> Pin<Box<dyn Future<Output = Result<Vec<MessageHandlerEvent, Global>, Error>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn handle<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, ctx: &'life1 MessagePayload<Message>, msg: &'life2 T ) -> Pin<Box<dyn Future<Output = Result<Vec<MessageHandlerEvent, Global>, Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, Self: 'async_trait,
Message handler.
Implementors§
impl HandleMsg<VNodeOperation> for MessageHandler
impl HandleMsg<ConnectNodeReport> for MessageHandler
impl HandleMsg<ConnectNodeSend> for MessageHandler
impl HandleMsg<CustomMessage> for MessageHandler
impl HandleMsg<FindSuccessorReport> for MessageHandler
impl HandleMsg<FindSuccessorSend> for MessageHandler
impl HandleMsg<FoundVNode> for MessageHandler
impl HandleMsg<JoinDHT> for MessageHandler
impl HandleMsg<LeaveDHT> for MessageHandler
impl HandleMsg<NotifyPredecessorReport> for MessageHandler
impl HandleMsg<NotifyPredecessorSend> for MessageHandler
impl HandleMsg<QueryForTopoInfoReport> for MessageHandler
Try join received node into DHT after received from TopoInfo.
impl HandleMsg<QueryForTopoInfoSend> for MessageHandler
QueryForTopoInfoSend is direct message