#[non_exhaustive]pub enum PresentationState {
Declared,
CreationAllowed,
Ready,
Suspended,
Unavailable(PresentationUnavailableReason),
Destroyed,
}Expand description
Provider-neutral lifecycle state for a logical window presentation.
This enum models host/surface availability without owning a native window or GPU resource. It is non-exhaustive for downstream consumers.
§Examples
use ailloli_ui_runtime::app::{PresentationState, PresentationUnavailableReason};
assert_ne!(PresentationState::Declared, PresentationState::Ready);
assert_eq!(PresentationState::Unavailable(PresentationUnavailableReason::ZeroExtent), PresentationState::Unavailable(PresentationUnavailableReason::ZeroExtent));Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Declared
Logical window exists but creation has not been authorized.
CreationAllowed
Host may create/attach a native presentation.
Ready
Native presentation is attached and accepts this generation’s events.
Suspended
Presentation is detached during host suspension.
Presentation cannot currently be used for the recorded reason.
Destroyed
Terminal lifecycle state; only another Destroy event is accepted.
Trait Implementations§
Source§impl Clone for PresentationState
impl Clone for PresentationState
Source§fn clone(&self) -> PresentationState
fn clone(&self) -> PresentationState
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 PresentationState
impl Debug for PresentationState
Source§impl PartialEq for PresentationState
impl PartialEq for PresentationState
impl Copy for PresentationState
impl Eq for PresentationState
impl StructuralPartialEq for PresentationState
Auto Trait Implementations§
impl Freeze for PresentationState
impl RefUnwindSafe for PresentationState
impl Send for PresentationState
impl Sync for PresentationState
impl Unpin for PresentationState
impl UnwindSafe for PresentationState
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.