pub struct AppExtended<E: AppExtension> { /* private fields */ }
Expand description
Application builder.
You can use APP
to start building the app.
Implementations§
source§impl AppExtended<Vec<Box<dyn AppExtensionBoxed>>>
impl AppExtended<Vec<Box<dyn AppExtensionBoxed>>>
sourcepub fn extend<F: AppExtension>(
self,
extension: F,
) -> AppExtended<Vec<Box<dyn AppExtensionBoxed>>>
pub fn extend<F: AppExtension>( self, extension: F, ) -> AppExtended<Vec<Box<dyn AppExtensionBoxed>>>
Includes an application extension.
sourcepub fn enable_device_events(
self,
) -> AppExtended<Vec<Box<dyn AppExtensionBoxed>>>
pub fn enable_device_events( self, ) -> AppExtended<Vec<Box<dyn AppExtensionBoxed>>>
If the application should notify raw device events.
Device events are raw events not targeting any window, like a mouse move on any part of the screen.
They tend to be high-volume events so there is a performance cost to activating this. Note that if
this is false
you still get the mouse move over windows of the app.
source§impl<E: AppExtension> AppExtended<E>
impl<E: AppExtension> AppExtended<E>
sourcepub fn view_process_exe(self, view_process_exe: impl Into<PathBuf>) -> Self
pub fn view_process_exe(self, view_process_exe: impl Into<PathBuf>) -> Self
Set the path to the executable for the View Process.
By the default the current executable is started again as a View Process, you can use two executables instead, by setting this value.
Note that the view_process_exe
must start a view server and both
executables must be build using the same exact VERSION
.
sourcepub fn view_process_env(
self,
name: impl Into<Txt>,
value: impl Into<Txt>,
) -> Self
pub fn view_process_env( self, name: impl Into<Txt>, value: impl Into<Txt>, ) -> Self
Set an env variable for the view-process.
sourcepub fn run<F: Future<Output = ()> + Send + 'static>(
self,
start: impl IntoFuture<IntoFuture = F>,
)
pub fn run<F: Future<Output = ()> + Send + 'static>( self, start: impl IntoFuture<IntoFuture = F>, )
Starts the app, then starts polling start
to run.
This method only returns when the app has exited.
The start
task runs in a UiTask
in the app context, note that it only needs to start the app, usually
by opening a window, the app will keep running after start
is finished.
sourcepub fn run_headless(self, with_renderer: bool) -> HeadlessApp
pub fn run_headless(self, with_renderer: bool) -> HeadlessApp
Initializes extensions in headless mode and returns an HeadlessApp
.
If with_renderer
is true
spawns a renderer process for headless rendering. See HeadlessApp::renderer_enabled
for more details.
Auto Trait Implementations§
impl<E> Freeze for AppExtended<E>where
E: Freeze,
impl<E> RefUnwindSafe for AppExtended<E>where
E: RefUnwindSafe,
impl<E> !Send for AppExtended<E>
impl<E> !Sync for AppExtended<E>
impl<E> Unpin for AppExtended<E>where
E: Unpin,
impl<E> UnwindSafe for AppExtended<E>where
E: UnwindSafe,
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more