pub struct DispatchResult {
pub result: EventResult,
pub render_requested: bool,
pub quit_requested: bool,
pub emitted_events: Vec<DynEvent>,
}Expand description
Result of dispatching with context.
Contains both the event result and any side effects from handlers.
Fields§
§result: EventResultThe event handling result
render_requested: boolWhether any handler requested a render
quit_requested: boolWhether any handler requested quit
emitted_events: Vec<DynEvent>Events emitted by handlers (need to be dispatched)
Implementations§
Source§impl DispatchResult
impl DispatchResult
Sourcepub fn new(result: EventResult, ctx: &mut HandlerContext<'_>) -> Self
pub fn new(result: EventResult, ctx: &mut HandlerContext<'_>) -> Self
Create a new dispatch result.
Sourcepub const fn not_handled() -> Self
pub const fn not_handled() -> Self
Create a result indicating no handlers matched.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DispatchResult
impl !RefUnwindSafe for DispatchResult
impl Send for DispatchResult
impl Sync for DispatchResult
impl Unpin for DispatchResult
impl UnsafeUnpin for DispatchResult
impl !UnwindSafe for DispatchResult
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more