pub trait HandleVoteEvent<TYPES, VOTE, CERT>where
TYPES: NodeType,
VOTE: Vote<TYPES> + AggregatableVote<TYPES, VOTE, CERT>,
CERT: Certificate<TYPES, VOTE::Commitment, Voteable = VOTE::Commitment> + Debug,{
// Required methods
fn handle_vote_event<'life0, 'life1, 'async_trait>(
&'life0 mut self,
event: Arc<HotShotEvent<TYPES>>,
sender: &'life1 Sender<Arc<HotShotEvent<TYPES>>>,
) -> Pin<Box<dyn Future<Output = Result<Option<CERT>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn filter(event: Arc<HotShotEvent<TYPES>>) -> bool;
}
Expand description
Trait for types which will handle a vote event.
Required Methods§
Sourcefn handle_vote_event<'life0, 'life1, 'async_trait>(
&'life0 mut self,
event: Arc<HotShotEvent<TYPES>>,
sender: &'life1 Sender<Arc<HotShotEvent<TYPES>>>,
) -> Pin<Box<dyn Future<Output = Result<Option<CERT>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn handle_vote_event<'life0, 'life1, 'async_trait>(
&'life0 mut self,
event: Arc<HotShotEvent<TYPES>>,
sender: &'life1 Sender<Arc<HotShotEvent<TYPES>>>,
) -> Pin<Box<dyn Future<Output = Result<Option<CERT>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Sourcefn filter(event: Arc<HotShotEvent<TYPES>>) -> bool
fn filter(event: Arc<HotShotEvent<TYPES>>) -> bool
Event filter to use for this event
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.