Struct event_loop::Events
source · pub struct Events { /* private fields */ }
Expand description
An event loop iterator
Warning: Because the iterator polls events from the window back-end, it must be used on the same thread as the window back-end (usually main thread), unless the window back-end supports multi-thread event polling.
Implementations§
Trait Implementations§
source§impl EventLoop for Events
impl EventLoop for Events
source§fn get_event_settings(&self) -> EventSettings
fn get_event_settings(&self) -> EventSettings
Returns event loop settings.
source§fn set_event_settings(&mut self, settings: EventSettings)
fn set_event_settings(&mut self, settings: EventSettings)
Sets event loop settings.
source§fn set_ups_reset(&mut self, frames: u64)
fn set_ups_reset(&mut self, frames: u64)
The number of delayed updates before skipping them to catch up.
When set to
0
, it will always try to catch up. Read moresource§fn ups_reset(self, frames: u64) -> Self
fn ups_reset(self, frames: u64) -> Self
The number of delayed updates before skipping them to catch up.
When set to
0
, it will always try to catch up. Read moresource§fn set_max_fps(&mut self, frames: u64)
fn set_max_fps(&mut self, frames: u64)
The maximum number of frames per second Read more
source§fn set_swap_buffers(&mut self, enable: bool)
fn set_swap_buffers(&mut self, enable: bool)
Enable or disable automatic swapping of buffers.
source§fn swap_buffers(self, enable: bool) -> Self
fn swap_buffers(self, enable: bool) -> Self
Enable or disable automatic swapping of buffers.
source§fn set_bench_mode(&mut self, enable: bool)
fn set_bench_mode(&mut self, enable: bool)
Enable or disable benchmark mode.
When enabled, it will render and update without sleep and ignore input.
Used to test performance by playing through as fast as possible.
Requires
lazy
to be set to false
. Read moresource§fn bench_mode(self, enable: bool) -> Self
fn bench_mode(self, enable: bool) -> Self
Enable or disable benchmark mode.
When enabled, it will render and update without sleep and ignore input.
Used to test performance by playing through as fast as possible.
Requires
lazy
to be set to false
. Read more