#[non_exhaustive]pub struct PresentationTestState {Show 14 fields
pub logical_window_id: LogicalWindowId,
pub state: PresentationState,
pub generation: PresentationGeneration,
pub attached: bool,
pub detach_count: u64,
pub recovery_count: u64,
pub gpu_context_reuse_count: u64,
pub gpu_context_rebuild_count: u64,
pub lost_count: u64,
pub outdated_count: u64,
pub zero_extent_count: u64,
pub rejected_stale_event_count: u64,
pub pending_fault_count: usize,
pub rendered_frame_count: u64,
}Expand description
Observable lifecycle state for deterministic native tests.
All counters are cumulative and saturating within the lifetime of the
retained logical window. attached distinguishes live native presentation
state from suspended retained state.
§Examples
use ailloli_ui_winit::PresentationTestState;
fn inspect(state: &PresentationTestState) {
let generation: u64 = state.generation.get();
let _ = (state.attached, generation, state.state);
}Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.logical_window_id: LogicalWindowIdStable logical window identity.
state: PresentationStateProvider-neutral presentation lifecycle state.
generation: PresentationGenerationCurrent attachment generation; stale envelopes use older values.
attached: boolWhether a native presentation currently owns this retained state.
detach_count: u64Number of completed native detach operations.
recovery_count: u64Number of acquisition-recovery sequences requested.
gpu_context_reuse_count: u64Reattachments that retained the existing GPU context and caches.
gpu_context_rebuild_count: u64Reattachments that required a new adapter/device/pipeline context.
lost_count: u64Number of injected or observed lost-surface paths.
outdated_count: u64Number of injected or observed outdated-surface paths.
zero_extent_count: u64Number of injected zero-extent round trips.
rejected_stale_event_count: u64Number of generation-mismatched injected envelopes rejected.
pending_fault_count: usizeNumber of queued faults not yet serviced for this logical window.
rendered_frame_count: u64Successful native frames rendered for this retained presentation.
Unlike rendered_once, this counter is not reset by a test fault. It
lets native capture tests wait for a geometry-publishing warmup frame
and a subsequent layout frame before issuing a one-shot capture.
Trait Implementations§
Source§impl Clone for PresentationTestState
impl Clone for PresentationTestState
Source§fn clone(&self) -> PresentationTestState
fn clone(&self) -> PresentationTestState
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PresentationTestState
impl Debug for PresentationTestState
Source§impl PartialEq for PresentationTestState
impl PartialEq for PresentationTestState
impl Eq for PresentationTestState
impl StructuralPartialEq for PresentationTestState
Auto Trait Implementations§
impl Freeze for PresentationTestState
impl RefUnwindSafe for PresentationTestState
impl Send for PresentationTestState
impl Sync for PresentationTestState
impl Unpin for PresentationTestState
impl UnwindSafe for PresentationTestState
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<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§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
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<A> IntoClickAction<A> for Awhere
A: Clone + 'static,
impl<A> IntoClickAction<A> for Awhere
A: Clone + 'static,
§fn into_click_action(self) -> ClickAction<A>
fn into_click_action(self) -> ClickAction<A>
Implements the into_click_action helper used by this module.
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more