Trait appit::Run

source ·
pub trait Run: WindowBehavior<()> {
    // Provided methods
    fn run() -> Result<(), EventLoopError>
       where Self::Context: Default { ... }
    fn run_with(context: Self::Context) -> Result<(), EventLoopError> { ... }
}
Expand description

A runnable window.

Provided Methods§

source

fn run() -> Result<(), EventLoopError>
where Self::Context: Default,

Runs a window with a default instance of this behavior’s Context.

This function is shorthand for creating a PendingApp, opening this window inside of it, and running the pending app.

§Errors

Returns an EventLoopError upon the loop exiting due to an error. See [EventLoop::run] for more information.

source

fn run_with(context: Self::Context) -> Result<(), EventLoopError>

Runs a window with the provided Context.

This function is shorthand for creating a PendingApp, opening this window inside of it, and running the pending app.

§Errors

Returns an EventLoopError upon the loop exiting due to an error. See [EventLoop::run] for more information.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T> Run for T
where T: WindowBehavior<()>,