pub struct Loop<E: 'static + Debug> { /* private fields */ }
Expand description
Loop wrapping for the winit event loop.
Implementations§
Source§impl<E: 'static + Debug> Loop<E>
impl<E: 'static + Debug> Loop<E>
Sourcepub fn create_event_publisher(&mut self) -> LoopPublisher<E>
pub fn create_event_publisher(&mut self) -> LoopPublisher<E>
Create an event publisher for this Loop.
Sourcepub fn get_primary_monitor(&self) -> Option<MonitorHandle>
pub fn get_primary_monitor(&self) -> Option<MonitorHandle>
Returns the primary monitor for the current OS if detectable.
Sourcepub fn get_all_monitors(&self) -> impl Iterator<Item = MonitorHandle>
pub fn get_all_monitors(&self) -> impl Iterator<Item = MonitorHandle>
Get all monitors available on the system.
Sourcepub fn get_any_available_monitors(&self) -> Option<MonitorHandle>
pub fn get_any_available_monitors(&self) -> Option<MonitorHandle>
Gets the first available monitor or panics.
Sourcepub fn run_forever<Callback>(self, callback: Callback)
pub fn run_forever<Callback>(self, callback: Callback)
Uses the winit event loop to run forever
Auto Trait Implementations§
impl<E> !Freeze for Loop<E>
impl<E> !RefUnwindSafe for Loop<E>
impl<E> !Send for Loop<E>
impl<E> !Sync for Loop<E>
impl<E> Unpin for Loop<E>where
E: Unpin,
impl<E> !UnwindSafe for Loop<E>
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