pub struct DelegatedEvent<E: Event> {
pub event: E,
pub propagation: EventPropagation,
}
Expand description
An enhanced event that includes propagation information
Fields§
§event: E
The original event
propagation: EventPropagation
Propagation control
Implementations§
Source§impl<E: Event> DelegatedEvent<E>
impl<E: Event> DelegatedEvent<E>
Sourcepub fn new(event: E, phase: PropagationPhase) -> Self
pub fn new(event: E, phase: PropagationPhase) -> Self
Create a new delegated event
Sourcepub fn stop_propagation(&mut self)
pub fn stop_propagation(&mut self)
Stop propagation of this event
Sourcepub fn prevent_default(&mut self)
pub fn prevent_default(&mut self)
Prevent the default action for this event
Auto Trait Implementations§
impl<E> Freeze for DelegatedEvent<E>where
E: Freeze,
impl<E> RefUnwindSafe for DelegatedEvent<E>where
E: RefUnwindSafe,
impl<E> Send for DelegatedEvent<E>where
E: Send,
impl<E> Sync for DelegatedEvent<E>where
E: Sync,
impl<E> Unpin for DelegatedEvent<E>where
E: Unpin,
impl<E> UnwindSafe for DelegatedEvent<E>where
E: UnwindSafe,
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