pub struct AppBuilder { /* private fields */ }Expand description
Application builder.
You can use APP to start building the app.
Implementations§
Source§impl AppBuilder
impl AppBuilder
Sourcepub fn view_process_exe(
self,
view_process_exe: impl Into<PathBuf>,
) -> AppBuilder
pub fn view_process_exe( self, view_process_exe: impl Into<PathBuf>, ) -> AppBuilder
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>,
) -> AppBuilder
pub fn view_process_env( self, name: impl Into<Txt>, value: impl Into<Txt>, ) -> AppBuilder
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 the app context, note that the future 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 AppRunWindowExt for AppBuilder
impl AppRunWindowExt for AppBuilder
Source§fn run_window<F>(
self,
window_id: impl Into<WindowId>,
new_window: impl IntoFuture<IntoFuture = F>,
)
fn run_window<F>( self, window_id: impl Into<WindowId>, new_window: impl IntoFuture<IntoFuture = F>, )
Auto Trait Implementations§
impl Freeze for AppBuilder
impl RefUnwindSafe for AppBuilder
impl !Send for AppBuilder
impl !Sync for AppBuilder
impl Unpin for AppBuilder
impl UnwindSafe for AppBuilder
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<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> 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> 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