pub trait EventProvider {
// Required method
fn get_pending_events(&self, timestamp: Instant) -> Vec<SyntheticEvent>;
}Expand description
Trait for managers to provide their pending events.
Each manager (TextInputManager, ScrollManager, etc.) implements this to
report what events occurred since the last frame. This enables a unified,
lazy event determination system.
Required Methods§
Sourcefn get_pending_events(&self, timestamp: Instant) -> Vec<SyntheticEvent>
fn get_pending_events(&self, timestamp: Instant) -> Vec<SyntheticEvent>
Get all pending events from this manager.
Events should include:
target: TheDomNodeIdthat was affectedevent_type: What happened (Input, Scroll, Focus, etc.)source:EventSource::Userfor input,EventSource::Programmaticfor API callsdata: Type-specific event data
After calling this, the manager should mark events as “read” so they aren’t returned again next frame.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".