Trait event_queue::Event

source ·
pub trait Event: Clone {
    // Required method
    fn can_merge(&self, other: &Self) -> bool;
}
Expand description

The event type need to implement this trait to tell the event queue whether two consecutive pending events can be merged into a single event, if can_merge returns true, the event queue will replace the last event in the queue with the latest event.

Required Methods§

source

fn can_merge(&self, other: &Self) -> bool

Returns whether this event can be merged with another event.

Object Safety§

This trait is not object safe.

Implementors§