Struct AppFrameReport

pub struct AppFrameReport {
    pub scheduled_updates: u32,
    pub executed_updates: u32,
    pub dt: f32,
    pub alpha: f32,
    pub dropped_seconds: f64,
    pub rendered: bool,
    pub control: AppControl,
}
Expand description

Execution and timing details for one completed host frame call.

Returned by App::frame_report and retained by App::last_frame_report, including when a frame returns an error. Counts describe hooks that actually ran, not successful simulation commits: a failing hook may mutate game state. See App::frame_report for an executable example.

Fields§

§scheduled_updates: u32

Number of fixed updates budgeted by the session for this frame.

The session tick includes this whole budget, even when stop/error skips some hooks. Zero if startup stops/fails or the app was already stopped.

§executed_updates: u32

Number of fixed-update hooks that ran, including one returning Stop or Err.

Never greater than scheduled_updates; an error does not roll back work.

§dt: f32

The session’s fixed timestep in seconds, even when no updates run.

§alpha: f32

The session’s interpolation factor in 0.0..=1.0 for this frame.

This is passed to render if it runs. It remains available when an update stops/fails before rendering, and is zero if the session is inactive or never advanced because startup stopped/failed or the app was stopped.

§dropped_seconds: f64

Whole-step time discarded by the clock’s catch-up budget, in seconds.

This is the session’s FrameStep::dropped_seconds unchanged. It excludes scheduled updates skipped by stop/error, inactive-session time, invalid elapsed time and time above the core clock’s elapsed-time cap.

§rendered: bool

Whether the render hook ran, including one returning Stop or Err.

This records invocation, not successful presentation by a host renderer.

§control: AppControl

Whether the app can accept another frame after this call.

Stop also covers errors and calls on an already stopped app. This is an application decision, independent of the session’s pause or terminal state.

Trait Implementations§

§

impl Clone for AppFrameReport

§

fn clone(&self) -> AppFrameReport

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
§

impl Debug for AppFrameReport

§

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

Formats the value using the given formatter. Read more
§

impl PartialEq for AppFrameReport

§

fn eq(&self, other: &AppFrameReport) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
§

impl Copy for AppFrameReport

§

impl StructuralPartialEq for AppFrameReport

Auto Trait Implementations§

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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.