pub enum App {
Rust(Root),
Js(Bundle),
}Expand description
The app an engine runs.
Variants§
Rust(Root)
A Rust app: its root component, mounted as the surface’s content.
Js(Bundle)
A JS app (feature js-core).
Implementations§
Source§impl App
impl App
Sourcepub fn main_window(&self) -> Option<&MainWindowOptions>
pub fn main_window(&self) -> Option<&MainWindowOptions>
The main window’s launch options (nsh.json "window"): a JS app’s
bundle’s (Bundle::main_window), a Rust app’s root’s
(nsh_core::element::Root::main_window). Runners open the main
window by them.
Sourcepub fn application(&self) -> Option<&ApplicationOptions>
pub fn application(&self) -> Option<&ApplicationOptions>
The app’s lifecycle options (nsh.json "application"): a Rust
app root’s (nsh_core::element::Root::application), a bundle’s
(Bundle::application).
Sourcepub fn app_info(&self) -> Option<&AppInfo>
pub fn app_info(&self) -> Option<&AppInfo>
The app as it was built: a Rust app root’s
(nsh_core::element::Root::app_info); None for a JS app, whose
VM reports its own (appInfo()).
Sourcepub fn url_schemes(&self) -> &[String]
pub fn url_schemes(&self) -> &[String]
The URL schemes the app claims (nsh.json schemes): those of
App::links.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for App
impl !UnwindSafe for App
impl Forget for App
impl Freeze for App
impl Move for App
impl Send for App
impl Sync for App
impl Unpin for App
impl UnsafeUnpin 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