Trait rings_core::measure::MessageSendBehaviour
source · pub trait MessageSendBehaviour<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
MessageSendBehaviour trait provides a default implementation for the good method, judging a node’s
behavior based on its message sending capabilities.
The “goodness” of a node is measured by comparing the sent and failed-to-send 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 sending behavior.