pub struct EventLoop<E: 'static> { /* private fields */ }Available on crate feature
EventLoop only.Expand description
Application event loop.
use concoct::{Context, Object};
use viewbuilder::{event_loop::Event, EventLoop};
struct App;
impl Object for App {}
impl App {
pub fn event(_cx: &mut Context<Self>, event: Event<()>) {
dbg!(event);
}
}
let event_loop = EventLoop::<()>::create();
let app = App.start();
event_loop.bind(&app, App::event);
EventLoop::run(event_loop);Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<E> !Freeze for EventLoop<E>
impl<E> !RefUnwindSafe for EventLoop<E>
impl<E> !Send for EventLoop<E>
impl<E> !Sync for EventLoop<E>
impl<E> Unpin for EventLoop<E>where
E: Unpin,
impl<E> !UnwindSafe for EventLoop<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