pub struct RuntimeStateSnapshot { /* private fields */ }Expand description
Interactive runtime state invariants that normal performance-driven backend switches MUST NEVER reset or downgrade.
Implementations§
Source§impl RuntimeStateSnapshot
Invariance checks for RuntimeStateSnapshot.
impl RuntimeStateSnapshot
Invariance checks for RuntimeStateSnapshot.
Sourcepub fn is_preserved_by(&self, after: &Self) -> bool
pub fn is_preserved_by(&self, after: &Self) -> bool
Verifies that scroll, gesture, focus, page state, animation timeline, and target refresh rate are completely preserved.
§Arguments
&Self- Pre-switch runtime state snapshot.&Self- Post-switch runtime state snapshot.
§Returns
bool-truewhen zero user/animation state was reset and target refresh rate did not drop.
Source§impl RuntimeStateSnapshot
impl RuntimeStateSnapshot
pub fn get_scroll_offset_x(&self) -> f32
pub fn get_mut_scroll_offset_x(&mut self) -> &mut f32
pub fn set_scroll_offset_x(&mut self, val: f32) -> &mut Self
pub fn get_scroll_offset_y(&self) -> f32
pub fn get_mut_scroll_offset_y(&mut self) -> &mut f32
pub fn set_scroll_offset_y(&mut self, val: f32) -> &mut Self
pub fn get_active_gesture_id(&self) -> u64
pub fn get_mut_active_gesture_id(&mut self) -> &mut u64
pub fn set_active_gesture_id(&mut self, val: u64) -> &mut Self
pub fn get_focused_node_id(&self) -> u64
pub fn get_mut_focused_node_id(&mut self) -> &mut u64
pub fn set_focused_node_id(&mut self, val: u64) -> &mut Self
pub fn get_page_state_revision(&self) -> u64
pub fn get_mut_page_state_revision(&mut self) -> &mut u64
pub fn set_page_state_revision(&mut self, val: u64) -> &mut Self
pub fn get_animation_timeline_ns(&self) -> u64
pub fn get_mut_animation_timeline_ns(&mut self) -> &mut u64
pub fn set_animation_timeline_ns(&mut self, val: u64) -> &mut Self
pub fn get_target_refresh_hz(&self) -> f64
pub fn get_mut_target_refresh_hz(&mut self) -> &mut f64
pub fn set_target_refresh_hz(&mut self, val: f64) -> &mut Self
Trait Implementations§
Source§impl Clone for RuntimeStateSnapshot
impl Clone for RuntimeStateSnapshot
impl Copy for RuntimeStateSnapshot
Source§impl Debug for RuntimeStateSnapshot
impl Debug for RuntimeStateSnapshot
Source§impl Default for RuntimeStateSnapshot
impl Default for RuntimeStateSnapshot
Source§impl PartialEq for RuntimeStateSnapshot
impl PartialEq for RuntimeStateSnapshot
impl StructuralPartialEq for RuntimeStateSnapshot
Auto Trait Implementations§
impl Forget for RuntimeStateSnapshot
impl Freeze for RuntimeStateSnapshot
impl Move for RuntimeStateSnapshot
impl RefUnwindSafe for RuntimeStateSnapshot
impl Send for RuntimeStateSnapshot
impl Sync for RuntimeStateSnapshot
impl Unpin for RuntimeStateSnapshot
impl UnsafeUnpin for RuntimeStateSnapshot
impl UnwindSafe for RuntimeStateSnapshot
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