Skip to main content

ManualVsyncHandle

Struct ManualVsyncHandle 

Source
pub struct ManualVsyncHandle { /* private fields */ }
Expand description

Shared atomic control handle paired with ManualVsyncPacer for deterministic tests.

All steady-state operations are strictly atomic (CountingAlloc == 0).

Implementations§

Source§

impl ManualVsyncHandle

Source

pub fn is_active(&self) -> bool

Returns whether the pacer is currently active.

Source

pub fn active_transitions(&self) -> u64

Returns the number of active state transitions observed (false -> true or true -> false).

Source

pub fn ticks_triggered(&self) -> u64

Returns how many coalesced ticks have been triggered via Self::trigger_tick.

Source

pub fn ticks_received(&self) -> u64

Returns how many ticks have been acknowledged via on_tick_received.

Source

pub fn is_tick_pending(&self) -> bool

Returns true when a triggered tick has not yet been acknowledged via on_tick_received.

Source

pub fn trigger_tick(&self) -> bool

Triggers one coalesced tick if the pacer is active and no tick is already in flight. Returns true when a new tick was emitted.

Source

pub fn set_nominal_interval_us(&self, interval_us: Option<u32>)

Updates the reported nominal frame interval in microseconds (None or Some(0) clears it).

Source

pub fn on_tick_received(&self)

Acknowledges receipt of a tick directly through the handle (mirrors VsyncPacer::on_tick_received).

Trait Implementations§

Source§

impl Clone for ManualVsyncHandle

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ManualVsyncHandle

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl !RefUnwindSafe for ManualVsyncHandle

§

impl !UnwindSafe for ManualVsyncHandle

§

impl Forget for ManualVsyncHandle

§

impl Freeze for ManualVsyncHandle
where *const ArcInner<ManualVsyncState> is !null: Freeze, PhantomData<ArcInner<ManualVsyncState>>: Freeze,

§

impl Move for ManualVsyncHandle

§

impl Send for ManualVsyncHandle
where Arc<ManualVsyncState>: Send,

§

impl Sync for ManualVsyncHandle
where Arc<ManualVsyncState>: Sync,

§

impl Unpin for ManualVsyncHandle
where Arc<ManualVsyncState>: Unpin,

§

impl UnsafeUnpin for ManualVsyncHandle
where *const ArcInner<ManualVsyncState> is !null: UnsafeUnpin, PhantomData<ArcInner<ManualVsyncState>>: UnsafeUnpin,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.