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 Appwhere
*const ArcInner<dyn Fn() -> AnyElement + Sync + Send> is !null: Freeze,
PhantomData<ArcInner<dyn Fn() -> AnyElement + Sync + Send>>: Freeze,
*const ArcInner<Tokens> is !null: Freeze,
PhantomData<ArcInner<Tokens>>: Freeze,
*const u8 is !null: Freeze,
PhantomData<Arc<[u8]>>: Freeze,
PhantomData<u8>: Freeze,
PhantomData<String>: Freeze,
PhantomData<WebLink>: Freeze,
PhantomData<HostPattern>: Freeze,
PhantomData<HttpGrant>: Freeze,
PhantomData<SocketGrant>: Freeze,
PhantomData<WebMedia>: Freeze,
PhantomData<WindowKind>: Freeze,
PhantomData<WindowLevel>: Freeze,
*const ArcInner<Inner> is !null: Freeze,
PhantomData<ArcInner<Inner>>: Freeze,
*const ArcInner<str> is !null: Freeze,
PhantomData<ArcInner<str>>: Freeze,
*const ArcInner<Vec<Chunk>> is !null: Freeze,
PhantomData<ArcInner<Vec<Chunk>>>: Freeze,
*const ArcInner<PackageInfo> is !null: Freeze,
PhantomData<ArcInner<PackageInfo>>: Freeze,
*const ArcInner<[u8]> is !null: Freeze,
PhantomData<ArcInner<[u8]>>: Freeze,
*const ArcInner<dyn Trial> is !null: Freeze,
PhantomData<ArcInner<dyn Trial>>: Freeze,
impl Move for App
impl Send for App
impl Sync for App
impl Unpin for App
impl UnsafeUnpin for Appwhere
*const ArcInner<dyn Fn() -> AnyElement + Sync + Send> is !null: UnsafeUnpin,
PhantomData<ArcInner<dyn Fn() -> AnyElement + Sync + Send>>: UnsafeUnpin,
*const ArcInner<Tokens> is !null: UnsafeUnpin,
PhantomData<ArcInner<Tokens>>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<Arc<[u8]>>: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
PhantomData<WebLink>: UnsafeUnpin,
PhantomData<HostPattern>: UnsafeUnpin,
PhantomData<HttpGrant>: UnsafeUnpin,
PhantomData<SocketGrant>: UnsafeUnpin,
PhantomData<WebMedia>: UnsafeUnpin,
PhantomData<WindowKind>: UnsafeUnpin,
PhantomData<WindowLevel>: UnsafeUnpin,
*const ArcInner<Inner> is !null: UnsafeUnpin,
PhantomData<ArcInner<Inner>>: UnsafeUnpin,
*const ArcInner<str> is !null: UnsafeUnpin,
PhantomData<ArcInner<str>>: UnsafeUnpin,
*const ArcInner<Vec<Chunk>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Vec<Chunk>>>: UnsafeUnpin,
*const ArcInner<PackageInfo> is !null: UnsafeUnpin,
PhantomData<ArcInner<PackageInfo>>: UnsafeUnpin,
*const ArcInner<[u8]> is !null: UnsafeUnpin,
PhantomData<ArcInner<[u8]>>: UnsafeUnpin,
*const ArcInner<dyn Trial> is !null: UnsafeUnpin,
PhantomData<ArcInner<dyn Trial>>: UnsafeUnpin,
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