Struct zng::app::AppExtended
source · pub struct AppExtended<E>where
E: AppExtension,{ /* private fields */ }
Expand description
Application builder.
You can use APP
to start building the app.
Implementations§
source§impl<E> AppExtended<E>where
E: AppExtension,
impl<E> AppExtended<E>where
E: AppExtension,
sourcepub fn view_process_exe(
self,
view_process_exe: impl Into<PathBuf>,
) -> AppExtended<E>
pub fn view_process_exe( self, view_process_exe: impl Into<PathBuf>, ) -> AppExtended<E>
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>,
) -> AppExtended<E>
pub fn view_process_env( self, name: impl Into<Txt>, value: impl Into<Txt>, ) -> AppExtended<E>
Set an env variable for the view-process.
sourcepub fn run<F>(self, start: impl IntoFuture<IntoFuture = F>)
pub fn run<F>(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.
Trait Implementations§
source§impl<E> AppRunWindowExt for AppExtended<E>where
E: AppExtension,
impl<E> AppRunWindowExt for AppExtended<E>where
E: AppExtension,
source§fn run_window<F>(self, new_window: impl IntoFuture<IntoFuture = F>)
fn run_window<F>(self, new_window: impl IntoFuture<IntoFuture = F>)
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§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> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§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