pub struct WinitExecutor { /* private fields */ }
Expand description
Executor implemented on top of winit eventloop using user event.
See WinitSignal
for more detail how it utilize winit user event.
Implementations§
Source§impl WinitExecutor
impl WinitExecutor
Sourcepub fn new(event_loop: EventLoop<ExecutorPollEvent>) -> Self
pub fn new(event_loop: EventLoop<ExecutorPollEvent>) -> Self
Create new WinitExecutor
Sourcepub fn run<C: AsyncComponent + WinitComponent + 'static>(
self,
func: impl FnOnce() -> C,
) -> !
pub fn run<C: AsyncComponent + WinitComponent + 'static>( self, func: impl FnOnce() -> C, ) -> !
Initializes the winit event loop and run component.
See EventLoop
for more detail about winit event loop
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for WinitExecutor
impl !RefUnwindSafe for WinitExecutor
impl !Send for WinitExecutor
impl !Sync for WinitExecutor
impl Unpin for WinitExecutor
impl !UnwindSafe for WinitExecutor
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