#[non_exhaustive]pub struct Pacing {
pub cap: FrameCap,
pub serial: u32,
pub vsync: bool,
pub fps: u16,
}Expand description
What the platform reports of its pacing, before each frame
(Game::set_pacing): the cap it applied and
its serial, whether it asked for vsync, and the frames a second it
measured. Built with Pacing::new; the rest is assigned.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.cap: FrameCapThe cap applied.
serial: u32The serial the cap came with: the latest the platform was handed.
vsync: boolWhether the platform asked the display’s driver for vsync (the driver may not give it).
fps: u16The frames a second it measured: a rolling average, 0 before it has measured.
Implementations§
Trait Implementations§
impl Copy for Pacing
Source§impl<'de> Deserialize<'de> for Pacing
impl<'de> Deserialize<'de> for Pacing
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Pacing
impl StructuralPartialEq for Pacing
Auto Trait Implementations§
impl Freeze for Pacing
impl RefUnwindSafe for Pacing
impl Send for Pacing
impl Sync for Pacing
impl Unpin for Pacing
impl UnsafeUnpin for Pacing
impl UnwindSafe for Pacing
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