pub struct App(_);
Implementations§
source§impl App
impl App
Represents an application before it is fully launched. Once your app is
configured, you’ll start the app with App::run
.
sourcepub fn production(asset_source: Arc<dyn AssetSource>) -> Self
pub fn production(asset_source: Arc<dyn AssetSource>) -> Self
Builds an app with the given asset source.
sourcepub fn run<F>(self, on_finish_launching: F)where
F: 'static + FnOnce(&mut AppContext),
pub fn run<F>(self, on_finish_launching: F)where F: 'static + FnOnce(&mut AppContext),
Start the application. The provided callback will be called once the app is fully launched.
sourcepub fn on_open_urls<F>(&self, callback: F) -> &Selfwhere
F: 'static + FnMut(Vec<String>, &mut AppContext),
pub fn on_open_urls<F>(&self, callback: F) -> &Selfwhere F: 'static + FnMut(Vec<String>, &mut AppContext),
Register a handler to be invoked when the platform instructs the application to open one or more URLs.
pub fn on_reopen<F>(&self, callback: F) -> &Selfwhere F: 'static + FnMut(&mut AppContext),
pub fn metadata(&self) -> AppMetadata
pub fn background_executor(&self) -> BackgroundExecutor
pub fn foreground_executor(&self) -> ForegroundExecutor
pub fn text_system(&self) -> Arc<TextSystem>
Auto Trait Implementations§
impl !RefUnwindSafe for App
impl !Send for App
impl !Sync for App
impl Unpin 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