Trait gui::EventChain
source · pub trait EventChain<ED> {
fn chain<ES>(self, event: ES) -> ChainEvent<ED>
where
ES: Into<ChainEvent<ED>>;
fn chain_opt<ES>(self, event: Option<ES>) -> ChainEvent<ED>
where
ES: Into<ChainEvent<ED>>;
}
Expand description
A trait for chaining of events.
Required Methods
sourcefn chain<ES>(self, event: ES) -> ChainEvent<ED>where
ES: Into<ChainEvent<ED>>,
fn chain<ES>(self, event: ES) -> ChainEvent<ED>where
ES: Into<ChainEvent<ED>>,
Chain together two events.
The given event will effectively be appended to the current one and, hence, be handled after the first one got processed.
sourcefn chain_opt<ES>(self, event: Option<ES>) -> ChainEvent<ED>where
ES: Into<ChainEvent<ED>>,
fn chain_opt<ES>(self, event: Option<ES>) -> ChainEvent<ED>where
ES: Into<ChainEvent<ED>>,
Chain together an event with an optional event.
This method returns the chain of the first event with the second one, if present, or otherwise just returns the first one.