pub struct PopupPortalOutcome { /* private fields */ }Expand description
Result of routing one popup lifecycle or input operation.
handled answers whether the popup authority consumed/recognized the
operation; it is independent from whether any intents were emitted. An
already-open raise, for example, may be handled with no new intent.
§Examples
use ailloli_ui_runtime::popup::PopupPortalOutcome;
let outcome = PopupPortalOutcome::default();
assert!(!outcome.handled() && outcome.intents().is_empty());Implementations§
Source§impl PopupPortalOutcome
Observation and ownership conversion for popup outcomes.
impl PopupPortalOutcome
Observation and ownership conversion for popup outcomes.
Sourcepub const fn handled(&self) -> bool
pub const fn handled(&self) -> bool
Reports whether the popup authority handled the operation.
§Examples
use ailloli_ui_runtime::popup::{PopupId, PopupPortal};
assert!(!PopupPortal::<()>::new().close(PopupId::new(1)).handled());Sourcepub fn intents(&self) -> &[PopupIntent]
pub fn intents(&self) -> &[PopupIntent]
Borrows ordered intents without consuming the outcome.
An empty slice does not imply handled == false.
§Examples
use ailloli_ui_runtime::popup::PopupPortalOutcome;
assert_eq!(PopupPortalOutcome::default().intents(), &[]);Sourcepub fn into_intents(self) -> Vec<PopupIntent>
pub fn into_intents(self) -> Vec<PopupIntent>
Consumes the outcome and returns its ordered intent vector.
The handled flag is discarded.
§Examples
use ailloli_ui_runtime::popup::PopupPortalOutcome;
assert!(PopupPortalOutcome::default().into_intents().is_empty());Trait Implementations§
Source§impl Clone for PopupPortalOutcome
impl Clone for PopupPortalOutcome
Source§fn clone(&self) -> PopupPortalOutcome
fn clone(&self) -> PopupPortalOutcome
Returns a copy 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 PopupPortalOutcome
impl Debug for PopupPortalOutcome
Source§impl Default for PopupPortalOutcome
impl Default for PopupPortalOutcome
Source§fn default() -> PopupPortalOutcome
fn default() -> PopupPortalOutcome
Returns the “default value” for a type. Read more
Source§impl PartialEq for PopupPortalOutcome
impl PartialEq for PopupPortalOutcome
impl Eq for PopupPortalOutcome
impl StructuralPartialEq for PopupPortalOutcome
Auto Trait Implementations§
impl Freeze for PopupPortalOutcome
impl RefUnwindSafe for PopupPortalOutcome
impl Send for PopupPortalOutcome
impl Sync for PopupPortalOutcome
impl Unpin for PopupPortalOutcome
impl UnwindSafe for PopupPortalOutcome
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<A> IntoClickAction<A> for Awhere
A: Clone + 'static,
impl<A> IntoClickAction<A> for Awhere
A: Clone + 'static,
Source§fn into_click_action(self) -> ClickAction<A>
fn into_click_action(self) -> ClickAction<A>
Implements the into_click_action helper used by this module.