pub enum EventResponse {
Handled,
Ignored,
StopPropagation,
Cancel,
StopAndCancel,
}Expand description
Response from an event handler
Variants§
Handled
Event was handled, continue propagation
Ignored
Event was not handled, continue propagation
StopPropagation
Event was handled, stop propagation
Cancel
Event was handled, cancel default action
StopAndCancel
Event was handled, stop propagation and cancel
Implementations§
Source§impl EventResponse
impl EventResponse
Sourcepub fn is_handled(&self) -> bool
pub fn is_handled(&self) -> bool
Check if the event was handled
Sourcepub fn should_stop(&self) -> bool
pub fn should_stop(&self) -> bool
Check if propagation should stop
Sourcepub fn should_cancel(&self) -> bool
pub fn should_cancel(&self) -> bool
Check if event should be cancelled
Trait Implementations§
Source§impl Clone for EventResponse
impl Clone for EventResponse
Source§fn clone(&self) -> EventResponse
fn clone(&self) -> EventResponse
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EventResponse
impl Debug for EventResponse
Source§impl PartialEq for EventResponse
impl PartialEq for EventResponse
impl Copy for EventResponse
impl Eq for EventResponse
impl StructuralPartialEq for EventResponse
Auto Trait Implementations§
impl Freeze for EventResponse
impl RefUnwindSafe for EventResponse
impl Send for EventResponse
impl Sync for EventResponse
impl Unpin for EventResponse
impl UnwindSafe for EventResponse
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more