pub struct AppRunner<W, R>{ /* private fields */ }Expand description
v0.1 runtime runner. It intentionally manages exactly one widget instance lifetime.
Timers and tasks are instance-owned and are shut down with stop/dispose.
Implementations§
Source§impl<W, R> AppRunner<W, R>
impl<W, R> AppRunner<W, R>
pub fn new(widget_name: impl Into<String>, widget: W, renderer: R) -> Self
pub fn widget_name(&self) -> &str
pub fn surface_size(&self) -> Size
pub fn set_surface_size(&mut self, size: Size)
pub fn attach_waker<F>(&mut self, wake: F)
pub fn initialize(&mut self, surface_size: Size) -> Result<()>
pub fn process_pending(&mut self) -> Result<()>
pub fn handle_host_event(&mut self, event: HostEvent) -> Result<()>
pub fn needs_redraw(&self) -> bool
pub fn render(&mut self, surface: &mut dyn RenderSurface) -> Result<()>
pub fn shutdown(&mut self) -> Result<()>
Trait Implementations§
Auto Trait Implementations§
impl<W, R> Freeze for AppRunner<W, R>
impl<W, R> !RefUnwindSafe for AppRunner<W, R>
impl<W, R> Send for AppRunner<W, R>
impl<W, R> !Sync for AppRunner<W, R>
impl<W, R> Unpin for AppRunner<W, R>
impl<W, R> UnsafeUnpin for AppRunner<W, R>
impl<W, R> !UnwindSafe for AppRunner<W, R>
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