pub struct PopupBackendResolution { /* private fields */ }Expand description
Observable backend selection, including a native-to-overlay fallback.
§Examples
use ailloli_ui_runtime::popup::{PopupBackend, PopupBackendCapabilities};
let value = PopupBackendCapabilities::overlay_only().resolve(PopupBackend::Native);
assert_eq!((value.requested(), value.selected()), (PopupBackend::Native, PopupBackend::Overlay));Implementations§
Source§impl PopupBackendResolution
Accessors for requested and selected backend identity.
impl PopupBackendResolution
Accessors for requested and selected backend identity.
Sourcepub const fn requested(self) -> PopupBackend
pub const fn requested(self) -> PopupBackend
Returns the original requested backend.
§Examples
use ailloli_ui_runtime::popup::{PopupBackend, PopupBackendCapabilities};
assert_eq!(PopupBackendCapabilities::overlay_only().resolve(PopupBackend::Native).requested(), PopupBackend::Native);Sourcepub const fn selected(self) -> PopupBackend
pub const fn selected(self) -> PopupBackend
Returns the supported backend chosen for presentation.
§Examples
use ailloli_ui_runtime::popup::{PopupBackend, PopupBackendCapabilities};
assert_eq!(PopupBackendCapabilities::overlay_only().resolve(PopupBackend::Native).selected(), PopupBackend::Overlay);Trait Implementations§
Source§impl Clone for PopupBackendResolution
impl Clone for PopupBackendResolution
Source§fn clone(&self) -> PopupBackendResolution
fn clone(&self) -> PopupBackendResolution
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 PopupBackendResolution
impl Debug for PopupBackendResolution
Source§impl PartialEq for PopupBackendResolution
impl PartialEq for PopupBackendResolution
impl Copy for PopupBackendResolution
impl Eq for PopupBackendResolution
impl StructuralPartialEq for PopupBackendResolution
Auto Trait Implementations§
impl Freeze for PopupBackendResolution
impl RefUnwindSafe for PopupBackendResolution
impl Send for PopupBackendResolution
impl Sync for PopupBackendResolution
impl Unpin for PopupBackendResolution
impl UnwindSafe for PopupBackendResolution
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.