pub struct App;Expand description
Starts and owns a Reactor application’s WinUI message loop.
Each run method blocks until all application-owned windows have closed.
Implementations§
Source§impl App
impl App
Sourcepub fn run(root: View) -> Result<()>
pub fn run(root: View) -> Result<()>
Runs one window whose root content is root.
This call blocks while the WinUI message loop is running.
Sourcepub fn run_windows<I>(roots: I) -> Result<()>where
I: IntoIterator<Item = View>,
pub fn run_windows<I>(roots: I) -> Result<()>where
I: IntoIterator<Item = View>,
Runs one independent window and component pump for each root view.
Unlike placing several views in a fragment, each item creates a separate native window. This call blocks until every application-owned window has closed.
Returns an invalid-argument error if roots is empty.
Sourcepub fn run_component<C: Component>(input: C::Input) -> Result<()>
pub fn run_component<C: Component>(input: C::Input) -> Result<()>
Runs one window rooted at component C.
This is equivalent to passing View::component to run, and blocks while
the WinUI message loop is running.
Auto Trait Implementations§
impl Freeze for App
impl RefUnwindSafe for App
impl Send for App
impl Sync for App
impl Unpin for App
impl UnsafeUnpin for App
impl UnwindSafe for App
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