Trait cushy::Open

source ·
pub trait Open: Sized {
    // Required methods
    fn open<App>(self, app: &App) -> Result<Option<WindowHandle>>
       where App: Application;
    fn run_in(self, app: PendingApp) -> Result;
}
Expand description

A type that can be opened as a window in an application.

Required Methods§

source

fn open<App>(self, app: &App) -> Result<Option<WindowHandle>>
where App: Application,

Opens the provided type as a window inside of app.

source

fn run_in(self, app: PendingApp) -> Result

Runs the provided type inside of the pending app, returning Ok(()) upon successful execution and program exit. Note that this function may not ever return on some platforms.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<Behavior> Open for Window<Behavior>
where Behavior: WindowBehavior,

source§

impl<T> Open for T
where T: MakeWidget,