#[repr(C)]pub struct DefaultActionResult {
pub action: DefaultAction,
pub prevented: bool,
}Expand description
Result of determining what default action should occur for an event.
This is computed AFTER event dispatch, based on:
- The event type
- The target element’s type/role
- Whether
prevent_default()was called
Fields§
§action: DefaultActionThe default action to perform (if any)
prevented: boolWhether the action was prevented by a callback
Implementations§
Source§impl DefaultActionResult
impl DefaultActionResult
Sourcepub const fn new(action: DefaultAction) -> Self
pub const fn new(action: DefaultAction) -> Self
Create a new result with a specific action
Sourcepub const fn has_action(&self) -> bool
pub const fn has_action(&self) -> bool
Check if there’s an action to perform
Trait Implementations§
Source§impl Clone for DefaultActionResult
impl Clone for DefaultActionResult
Source§fn clone(&self) -> DefaultActionResult
fn clone(&self) -> DefaultActionResult
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for DefaultActionResult
Source§impl Debug for DefaultActionResult
impl Debug for DefaultActionResult
Auto Trait Implementations§
impl Freeze for DefaultActionResult
impl RefUnwindSafe for DefaultActionResult
impl Send for DefaultActionResult
impl Sync for DefaultActionResult
impl Unpin for DefaultActionResult
impl UnsafeUnpin for DefaultActionResult
impl UnwindSafe for DefaultActionResult
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