pub enum KeyResponse<Msg = Callback> {
Ignored,
Handled(Option<Msg>),
Skip,
}Expand description
A widget’s response to a key received during the leaf→root bubble (the
focused one first, then its ancestors for as long as the result is Ignored).
Variants§
Ignored
Not concerned: the key keeps bubbling up.
Handled(Option<Msg>)
Consumed (with an optional message to emit): the bubbling stops.
Skip
Not consumed, but the bubbling stops, and no fallback is attempted.
Trait Implementations§
Source§impl<Msg: Clone> Clone for KeyResponse<Msg>
impl<Msg: Clone> Clone for KeyResponse<Msg>
Source§impl<Msg: Debug> Debug for KeyResponse<Msg>
impl<Msg: Debug> Debug for KeyResponse<Msg>
Source§impl<Msg: PartialEq> PartialEq for KeyResponse<Msg>
impl<Msg: PartialEq> PartialEq for KeyResponse<Msg>
impl<Msg: PartialEq> StructuralPartialEq for KeyResponse<Msg>
Auto Trait Implementations§
impl<Msg> Freeze for KeyResponse<Msg>
impl<Msg> RefUnwindSafe for KeyResponse<Msg>where
Option<Msg>: RefUnwindSafe,
impl<Msg> Send for KeyResponse<Msg>
impl<Msg> Sync for KeyResponse<Msg>
impl<Msg> Unpin for KeyResponse<Msg>
impl<Msg> UnsafeUnpin for KeyResponse<Msg>where
Option<Msg>: UnsafeUnpin,
impl<Msg> UnwindSafe for KeyResponse<Msg>where
Option<Msg>: 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