Trait rat_event::ConsumedEvent

source ·
pub trait ConsumedEvent {
    // Required method
    fn is_consumed(&self) -> bool;
}
Expand description

When composing several widgets, the minimum information from the outcome of the inner widget is, whether it used & consumed the event.

This allows shortcutting the event-handling and prevents double interactions with the event. The inner widget can special case an event, and the fallback behaviour on the outer layer should not run too.

Required Methods§

source

fn is_consumed(&self) -> bool

Implementations on Foreign Types§

source§

impl<V> ConsumedEvent for Option<V>
where V: ConsumedEvent,

source§

impl<V, E> ConsumedEvent for Result<V, E>
where V: ConsumedEvent,

Implementors§