Struct druid::AppLauncher

source ·
pub struct AppLauncher<T> { /* private fields */ }
Expand description

Handles initial setup of an application, and starts the runloop.

Implementations§

Create a new AppLauncher with the provided window.

Provide an optional closure that will be given mutable access to the environment and immutable access to the app state before launch.

This can be used to set or override theme values.

Set the AppDelegate.

👎Deprecated since 0.8.0: Use log_to_console instead

Initialize a minimal logger with DEBUG max level for printing logs out to stderr.

This is meant for use during development only.

Panics

Panics if the logger fails to initialize.

Initialize a minimal tracing subscriber with DEBUG max level for printing logs out to stderr.

This is meant for quick-and-dirty debugging. If you want more serious trace handling, it’s probably better to implement it yourself.

Panics

Panics if enable is true and the subscriber fails to initialize, for example if a tracing/tracing_wasm global logger was already set.

Never panics when enable is false, or have any other side effect.

Passing in false is useful if you want to enable a global logger as feature but log to console otherwise.

Calls start_console_logging with true.

Use custom localization resource

resources is a list of file names that contain strings. base_dir is a path to a directory that includes per-locale subdirectories.

This directory should be of the structure base_dir/{locale}/{resource}, where ‘{locale}’ is a valid BCP47 language tag, and {resource} is a .ftl included in resources.

Returns an ExtEventSink that can be moved between threads, and can be used to submit commands back to the application.

Build the windows and start the runloop.

Returns an error if a window cannot be instantiated. This is usually a fatal error.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Performs the conversion.
Performs the conversion.
Should always be Self
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more