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.source§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.source§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
.source§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
.impl Copy for Events
Auto Trait Implementations§
impl RefUnwindSafe for Events
impl Send for Events
impl Sync for Events
impl Unpin for Events
impl UnwindSafe for Events
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