#[non_exhaustive]pub enum Consumed {
No,
Yes,
}Expand description
Whether an Interaction claimed an event.
Reported by handle_event, so a caller with more than one
interaction context (a menu bar above a screen stack, a dropdown above a form) knows whether to
keep routing the same event further down. A coarse substitute, like “is the menu currently
open”, answers a different and less useful question: it stays true for events the menu
doesn’t care about (Resize, Paste, a key it doesn’t bind), and it depends on the caller
keeping that flag in sync with state that can change out from under it (closing the menu
without also clearing the flag). Consumed instead reports, per event, whether this call
actually used it.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
No
Nothing here claimed the event: keep routing it to whatever’s behind this interaction.
Yes
This interaction claimed the event: stop routing it further.
Implementations§
Trait Implementations§
Source§impl From<bool> for Consumed
impl From<bool> for Consumed
Source§fn from(consumed: bool) -> Self
fn from(consumed: bool) -> Self
true becomes Consumed::Yes, false becomes Consumed::No.
impl Copy for Consumed
impl Eq for Consumed
impl StructuralPartialEq for Consumed
Auto Trait Implementations§
impl Freeze for Consumed
impl RefUnwindSafe for Consumed
impl Send for Consumed
impl Sync for Consumed
impl Unpin for Consumed
impl UnsafeUnpin for Consumed
impl UnwindSafe for Consumed
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<C> WithAlpha for Cwhere
C: Copy,
impl<C> WithAlpha for Cwhere
C: Copy,
§fn with_alpha_first<A>(self, alpha: A) -> AlphaFirst<A, Self>
fn with_alpha_first<A>(self, alpha: A) -> AlphaFirst<A, Self>
self with alpha, storing alpha before the color in memory
(see [AlphaFirst]).§fn with_alpha_last<A>(self, alpha: A) -> AlphaLast<A, Self>
fn with_alpha_last<A>(self, alpha: A) -> AlphaLast<A, Self>
self with alpha, storing alpha after the color in memory
(see [AlphaLast]).