pub trait HandleMsg<T> {
// Required method
fn handle<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
context: &'life1 HandlerContext<'life2>,
msg: &'life3 T,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait;
}Expand description
Generic trait for handle message ,inspired by Actor-Model.
Required Methods§
Sourcefn handle<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
context: &'life1 HandlerContext<'life2>,
msg: &'life3 T,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
fn handle<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
context: &'life1 HandlerContext<'life2>,
msg: &'life3 T,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
Message handler.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl HandleMsg<AnnounceRelayHolder> for MessageHandler
impl HandleMsg<ConnectNodeReport> for MessageHandler
impl HandleMsg<ConnectNodeSend> for MessageHandler
impl HandleMsg<CustomMessage> for MessageHandler
impl HandleMsg<DeclareRelayCustody> for MessageHandler
impl HandleMsg<E2eHandshakeRequest> for MessageHandler
impl HandleMsg<E2eHandshakeResponse> for MessageHandler
impl HandleMsg<E2eStreamFrame> for MessageHandler
impl HandleMsg<EntryStoreReport> for MessageHandler
impl HandleMsg<FetchRelayInbox> for MessageHandler
impl HandleMsg<FindRelayHolder> for MessageHandler
impl HandleMsg<FindSuccessorReport> for MessageHandler
impl HandleMsg<FindSuccessorSend> for MessageHandler
impl HandleMsg<FoundEntry> for MessageHandler
impl HandleMsg<Leave> for MessageHandler
impl HandleMsg<NotifyPredecessorSend> for MessageHandler
impl HandleMsg<PlacedEntryOperation> for MessageHandler
impl HandleMsg<ProbeAcknowledgement> for MessageHandler
Provider verifies the acknowledgement before admitting bounded evidence.
impl HandleMsg<ProbeOffer> for MessageHandler
Beneficiary verifies an offered transcript and returns its role attestation once.
impl HandleMsg<ProbeRequest> for MessageHandler
Probe request is a direct authenticated overlay liveness probe.
Source§impl HandleMsg<QueryForTopoInfoReport> for MessageHandler
Admit only bounded topology candidates from a correlated topology report.
impl HandleMsg<QueryForTopoInfoReport> for MessageHandler
Admit only bounded topology candidates from a correlated topology report.
Sync-successor reports connect advertised successors before joining them to the local DHT. Stabilization reports use the same request-id discipline, then commit the reported topology only after the reporter and at least one reported peer are still routable under the transport lifecycle boundary.
impl HandleMsg<QueryForTopoInfoSend> for MessageHandler
QueryForTopoInfoSend is direct message