Trait rings_core::measure::MessageRecvBehaviour
source · pub trait MessageRecvBehaviour<const THRESHOLD: i64>: Measure {
// Provided method
fn good<'life0, 'async_trait>(
&'life0 self,
did: Did
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
}Expand description
MessageRecvBehaviour trait provides a default implementation for the good method, assessing a node’s
behavior based on its message receiving capabilities.
The “goodness” of a node is measured by comparing the received and failed-to-receive counts against a given threshold.
Provided Methods§
sourcefn good<'life0, 'async_trait>(
&'life0 self,
did: Did
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn good<'life0, 'async_trait>(
&'life0 self,
did: Did
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
This asynchronous method returns a boolean indicating whether the node identified by did has a satisfactory message receiving behavior.