Struct kas_wgpu::Toolkit[][src]

pub struct Toolkit<C: CustomPipe, T: Theme<DrawPipe<C>>> { /* fields omitted */ }
Expand description

A toolkit over winit and WebGPU

All KAS shells are expected to provide a similar Toolkit type and API. There is no trait abstraction over this API simply because there is very little reason to do so (and some reason not to: KISS).

Implementations

Construct a new instance with default options.

Environment variables may affect option selection; see documentation of Options::from_env. KAS config is provided by Options::read_config.

Construct an instance with custom options

The custom parameter accepts a custom draw pipe (see CustomPipeBuilder). Pass () if you don’t have one.

The Options parameter allows direct specification of shell options; usually, these are provided by Options::from_env.

KAS config is provided by Options::read_config and theme is configured through Options::init_theme_config.

Construct an instance with custom options and config

This is like Toolkit::new_custom, but allows KAS config to be specified directly, instead of loading via Options::read_config.

Unlike other the constructors, this method does not configure the theme. The user should call Options::init_theme_config before this method.

Access the theme by ref

Access the theme by ref mut

Assume ownership of and display a window

This is a convenience wrapper around Toolkit::add_boxed.

Note: typically, one should have W: Clone, enabling multiple usage.

Assume ownership of and display a window, inline

This is a convenience wrapper around Toolkit::add_boxed.

Note: typically, one should have W: Clone, enabling multiple usage.

Add a boxed window directly

Add a boxed window directly, inline

Create a proxy which can be used to update the UI from another thread

Run the main loop.

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

Cast from Self to T

Try converting from Self to T

Cast to integer, truncating Read more

Cast to the nearest integer Read more

Cast the floor to an integer Read more

Cast the ceiling to an integer Read more

Try converting to integer with truncation Read more

Try converting to the nearest integer Read more

Try converting the floor to an integer Read more

Try convert the ceiling to an integer Read more

Convert from T to Self

Try converting from T to Self

Returns true if the given item matches this filter

Performs the conversion.

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

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.