[][src]Struct uniui_build::WasmBuilder

pub struct WasmBuilder { /* fields omitted */ }

Builds ui-crates into WASM modules.

Implementations

impl WasmBuilder[src]

pub fn for_framework(framework: Framework) -> Self[src]

Creates new builder for Framework

pub fn add_path(&mut self, path: &str, crate_name: &str)[src]

Specify path to the page and module_name which implements the page

  • The path should be in format "/a/b/"
  • The crate_name should be the same as the crate name in [build-dependencies] secion of Cargo.toml

pub fn add_page<T>(
    &mut self,
    page: &'static dyn UiPage<Data = T>,
    crate_name: &str
)
[src]

Specify UiPage and module_name which implements the page

The crate_name should be the same as the crate name in [build-dependencies] secion of Cargo.toml

pub fn default_css_theme(&mut self, theme: String)[src]

Setup css theme for the app.

We recommend to check uniui_theme crate for that

pub fn execute(self)[src]

Builds all added crates.

You can access the results via

mod generated {
    include!(concat!(env!("OUT_DIR"), "/uni_build_generated.rs"));
}

Please refer to particular Framework's documentation for more information how it may be used.

Trait Implementations

impl Clone for WasmBuilder[src]

impl Debug for WasmBuilder[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.