Struct thyme::AppBuilder

source ·
pub struct AppBuilder { /* private fields */ }
Expand description

An easy to use but still fairly configurable builder, allowing you to get a Thyme app up in just a few lines of code. It is designed to cover the majority of cases and handles display creation, asset loading, and initial Thyme setup. If your use case isn’t covered here, you’ll need to manually create your ContextBuilder, and associated structs. See the examples.

Implementations§

source§

impl AppBuilder

source

pub fn new() -> AppBuilder

Creates a new empty App builder. Use with the builder pattern.

Example

// Assuming you have a theme definition in theme.yml, fonts in the fonts // directory and images in the images directory: let app = AppBuilder::new() .with_title(“My App”) .with_window_size(1600.0, 900.0) .with_theme_file(“theme.yml”) .with_font_dir(“fonts”) .with_image_dir(“images”) .build_glium(); *

Examples found in repository?
examples/hello_wgpu.rs (line 2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
fn main() -> Result<(), Box<dyn std::error::Error>> {
    let app = thyme::AppBuilder::new()
        .with_logger()
        .with_title("Thyme wgpu Demo")
        .with_window_size(1280.0, 720.0)
        .with_base_dir("examples/data")
        .with_theme_files(&["themes/base.yml", "themes/pixel.yml"])
        .with_font_dir("fonts")
        .with_image_dir("images")
        .build_wgpu()?;

    app.main_loop(|ui| {
        ui.window("window", |ui| {
            ui.gap(20.0);
    
            ui.button("label", "Hello, World!");
        });
    });
}
More examples
Hide additional examples
examples/hello_glium.rs (line 2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
fn main() -> Result<(), Box<dyn std::error::Error>> {
    let app = thyme::AppBuilder::new()
        .with_logger()
        .with_title("Thyme Glium Demo")
        .with_window_size(1280.0, 720.0)
        .with_base_dir("examples/data")
        .with_theme_files(&["themes/base.yml", "themes/pixel.yml"])
        .with_font_dir("fonts")
        .with_image_dir("images")
        .build_glium()?;

    app.main_loop(|ui| {
        ui.window("window", |ui| {
            ui.gap(20.0);
    
            ui.button("label", "Hello, World!");
        });
    });
}
examples/hello_gl.rs (line 2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
fn main() -> Result<(), Box<dyn std::error::Error>> {
    let app = thyme::AppBuilder::new()
        .with_logger()
        .with_title("Thyme Gl Demo")
        .with_window_size(1280.0, 720.0)
        .with_base_dir("examples/data")
        .with_theme_files(&["themes/base.yml", "themes/pixel.yml"])
        .with_font_dir("fonts")
        .with_image_dir("images")
        .build_gl()?;

    app.main_loop(|ui| {
        ui.window("window", |ui| {
            ui.gap(20.0);
    
            ui.button("label", "Hello, World!");
        });
    });
}
source

pub fn with_tooltip_time(self, time_millis: u32) -> AppBuilder

Set the time in milliseconds for tooltips to show. See BuildOptions

source

pub fn with_line_scroll(self, line_scroll: f32) -> AppBuilder

Set the number of lines that scrollbars will scroll per mouse scroll. See BuildOptions

source

pub fn with_logger(self) -> AppBuilder

If called, this App Builder will setup a default Thyme logger at the warn level. See SimpleLogger.

Examples found in repository?
examples/hello_wgpu.rs (line 3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
fn main() -> Result<(), Box<dyn std::error::Error>> {
    let app = thyme::AppBuilder::new()
        .with_logger()
        .with_title("Thyme wgpu Demo")
        .with_window_size(1280.0, 720.0)
        .with_base_dir("examples/data")
        .with_theme_files(&["themes/base.yml", "themes/pixel.yml"])
        .with_font_dir("fonts")
        .with_image_dir("images")
        .build_wgpu()?;

    app.main_loop(|ui| {
        ui.window("window", |ui| {
            ui.gap(20.0);
    
            ui.button("label", "Hello, World!");
        });
    });
}
More examples
Hide additional examples
examples/hello_glium.rs (line 3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
fn main() -> Result<(), Box<dyn std::error::Error>> {
    let app = thyme::AppBuilder::new()
        .with_logger()
        .with_title("Thyme Glium Demo")
        .with_window_size(1280.0, 720.0)
        .with_base_dir("examples/data")
        .with_theme_files(&["themes/base.yml", "themes/pixel.yml"])
        .with_font_dir("fonts")
        .with_image_dir("images")
        .build_glium()?;

    app.main_loop(|ui| {
        ui.window("window", |ui| {
            ui.gap(20.0);
    
            ui.button("label", "Hello, World!");
        });
    });
}
examples/hello_gl.rs (line 3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
fn main() -> Result<(), Box<dyn std::error::Error>> {
    let app = thyme::AppBuilder::new()
        .with_logger()
        .with_title("Thyme Gl Demo")
        .with_window_size(1280.0, 720.0)
        .with_base_dir("examples/data")
        .with_theme_files(&["themes/base.yml", "themes/pixel.yml"])
        .with_font_dir("fonts")
        .with_image_dir("images")
        .build_gl()?;

    app.main_loop(|ui| {
        ui.window("window", |ui| {
            ui.gap(20.0);
    
            ui.button("label", "Hello, World!");
        });
    });
}
source

pub fn with_title<T: Into<String>>(self, title: T) -> AppBuilder

Specifies the window title for this app.

Examples found in repository?
examples/hello_wgpu.rs (line 4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
fn main() -> Result<(), Box<dyn std::error::Error>> {
    let app = thyme::AppBuilder::new()
        .with_logger()
        .with_title("Thyme wgpu Demo")
        .with_window_size(1280.0, 720.0)
        .with_base_dir("examples/data")
        .with_theme_files(&["themes/base.yml", "themes/pixel.yml"])
        .with_font_dir("fonts")
        .with_image_dir("images")
        .build_wgpu()?;

    app.main_loop(|ui| {
        ui.window("window", |ui| {
            ui.gap(20.0);
    
            ui.button("label", "Hello, World!");
        });
    });
}
More examples
Hide additional examples
examples/hello_glium.rs (line 4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
fn main() -> Result<(), Box<dyn std::error::Error>> {
    let app = thyme::AppBuilder::new()
        .with_logger()
        .with_title("Thyme Glium Demo")
        .with_window_size(1280.0, 720.0)
        .with_base_dir("examples/data")
        .with_theme_files(&["themes/base.yml", "themes/pixel.yml"])
        .with_font_dir("fonts")
        .with_image_dir("images")
        .build_glium()?;

    app.main_loop(|ui| {
        ui.window("window", |ui| {
            ui.gap(20.0);
    
            ui.button("label", "Hello, World!");
        });
    });
}
examples/hello_gl.rs (line 4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
fn main() -> Result<(), Box<dyn std::error::Error>> {
    let app = thyme::AppBuilder::new()
        .with_logger()
        .with_title("Thyme Gl Demo")
        .with_window_size(1280.0, 720.0)
        .with_base_dir("examples/data")
        .with_theme_files(&["themes/base.yml", "themes/pixel.yml"])
        .with_font_dir("fonts")
        .with_image_dir("images")
        .build_gl()?;

    app.main_loop(|ui| {
        ui.window("window", |ui| {
            ui.gap(20.0);
    
            ui.button("label", "Hello, World!");
        });
    });
}
source

pub fn with_window_size(self, x: f32, y: f32) -> AppBuilder

Specifies the window size, in logical pixels, for this app.

Examples found in repository?
examples/hello_wgpu.rs (line 5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
fn main() -> Result<(), Box<dyn std::error::Error>> {
    let app = thyme::AppBuilder::new()
        .with_logger()
        .with_title("Thyme wgpu Demo")
        .with_window_size(1280.0, 720.0)
        .with_base_dir("examples/data")
        .with_theme_files(&["themes/base.yml", "themes/pixel.yml"])
        .with_font_dir("fonts")
        .with_image_dir("images")
        .build_wgpu()?;

    app.main_loop(|ui| {
        ui.window("window", |ui| {
            ui.gap(20.0);
    
            ui.button("label", "Hello, World!");
        });
    });
}
More examples
Hide additional examples
examples/hello_glium.rs (line 5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
fn main() -> Result<(), Box<dyn std::error::Error>> {
    let app = thyme::AppBuilder::new()
        .with_logger()
        .with_title("Thyme Glium Demo")
        .with_window_size(1280.0, 720.0)
        .with_base_dir("examples/data")
        .with_theme_files(&["themes/base.yml", "themes/pixel.yml"])
        .with_font_dir("fonts")
        .with_image_dir("images")
        .build_glium()?;

    app.main_loop(|ui| {
        ui.window("window", |ui| {
            ui.gap(20.0);
    
            ui.button("label", "Hello, World!");
        });
    });
}
examples/hello_gl.rs (line 5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
fn main() -> Result<(), Box<dyn std::error::Error>> {
    let app = thyme::AppBuilder::new()
        .with_logger()
        .with_title("Thyme Gl Demo")
        .with_window_size(1280.0, 720.0)
        .with_base_dir("examples/data")
        .with_theme_files(&["themes/base.yml", "themes/pixel.yml"])
        .with_font_dir("fonts")
        .with_image_dir("images")
        .build_gl()?;

    app.main_loop(|ui| {
        ui.window("window", |ui| {
            ui.gap(20.0);
    
            ui.button("label", "Hello, World!");
        });
    });
}
source

pub fn with_base_dir(self, dir: &str) -> AppBuilder

Specifies a top level base directory, that all other assets will be read as subdirectories of. By default, this will just be the current working directory

Examples found in repository?
examples/hello_wgpu.rs (line 6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
fn main() -> Result<(), Box<dyn std::error::Error>> {
    let app = thyme::AppBuilder::new()
        .with_logger()
        .with_title("Thyme wgpu Demo")
        .with_window_size(1280.0, 720.0)
        .with_base_dir("examples/data")
        .with_theme_files(&["themes/base.yml", "themes/pixel.yml"])
        .with_font_dir("fonts")
        .with_image_dir("images")
        .build_wgpu()?;

    app.main_loop(|ui| {
        ui.window("window", |ui| {
            ui.gap(20.0);
    
            ui.button("label", "Hello, World!");
        });
    });
}
More examples
Hide additional examples
examples/hello_glium.rs (line 6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
fn main() -> Result<(), Box<dyn std::error::Error>> {
    let app = thyme::AppBuilder::new()
        .with_logger()
        .with_title("Thyme Glium Demo")
        .with_window_size(1280.0, 720.0)
        .with_base_dir("examples/data")
        .with_theme_files(&["themes/base.yml", "themes/pixel.yml"])
        .with_font_dir("fonts")
        .with_image_dir("images")
        .build_glium()?;

    app.main_loop(|ui| {
        ui.window("window", |ui| {
            ui.gap(20.0);
    
            ui.button("label", "Hello, World!");
        });
    });
}
examples/hello_gl.rs (line 6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
fn main() -> Result<(), Box<dyn std::error::Error>> {
    let app = thyme::AppBuilder::new()
        .with_logger()
        .with_title("Thyme Gl Demo")
        .with_window_size(1280.0, 720.0)
        .with_base_dir("examples/data")
        .with_theme_files(&["themes/base.yml", "themes/pixel.yml"])
        .with_font_dir("fonts")
        .with_image_dir("images")
        .build_gl()?;

    app.main_loop(|ui| {
        ui.window("window", |ui| {
            ui.gap(20.0);
    
            ui.button("label", "Hello, World!");
        });
    });
}
source

pub fn with_theme_files(self, files: &[&str]) -> AppBuilder

Specifies the set of YAML theme files to read in as your theme definition. The filename is relative to the base directory. Only the last of with_theme_files, with_theme_file, or with_theme_dir will take effect.

Examples found in repository?
examples/hello_wgpu.rs (line 7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
fn main() -> Result<(), Box<dyn std::error::Error>> {
    let app = thyme::AppBuilder::new()
        .with_logger()
        .with_title("Thyme wgpu Demo")
        .with_window_size(1280.0, 720.0)
        .with_base_dir("examples/data")
        .with_theme_files(&["themes/base.yml", "themes/pixel.yml"])
        .with_font_dir("fonts")
        .with_image_dir("images")
        .build_wgpu()?;

    app.main_loop(|ui| {
        ui.window("window", |ui| {
            ui.gap(20.0);
    
            ui.button("label", "Hello, World!");
        });
    });
}
More examples
Hide additional examples
examples/hello_glium.rs (line 7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
fn main() -> Result<(), Box<dyn std::error::Error>> {
    let app = thyme::AppBuilder::new()
        .with_logger()
        .with_title("Thyme Glium Demo")
        .with_window_size(1280.0, 720.0)
        .with_base_dir("examples/data")
        .with_theme_files(&["themes/base.yml", "themes/pixel.yml"])
        .with_font_dir("fonts")
        .with_image_dir("images")
        .build_glium()?;

    app.main_loop(|ui| {
        ui.window("window", |ui| {
            ui.gap(20.0);
    
            ui.button("label", "Hello, World!");
        });
    });
}
examples/hello_gl.rs (line 7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
fn main() -> Result<(), Box<dyn std::error::Error>> {
    let app = thyme::AppBuilder::new()
        .with_logger()
        .with_title("Thyme Gl Demo")
        .with_window_size(1280.0, 720.0)
        .with_base_dir("examples/data")
        .with_theme_files(&["themes/base.yml", "themes/pixel.yml"])
        .with_font_dir("fonts")
        .with_image_dir("images")
        .build_gl()?;

    app.main_loop(|ui| {
        ui.window("window", |ui| {
            ui.gap(20.0);
    
            ui.button("label", "Hello, World!");
        });
    });
}
source

pub fn with_theme_file(self, file: &str) -> AppBuilder

Specifies a single YAML theme file to read in as your theme definition. The filename is relative to the base directory. Only the last of with_theme_files, with_theme_file, or with_theme_dir will take effect.

source

pub fn with_theme_dir(self, dir: &str) -> AppBuilder

Specifies to read all YAML files inside the specified directory and parse them to create your theme definition. The dir path is relative to the base directory. Only the last of with_theme_files, with_theme_file, or with_theme_dir will take effect.

source

pub fn with_font_files(self, files: &[&str]) -> AppBuilder

Specifies to read the specified TTF files as fonts for use in your theme. The fonts will be registered with an ID of the filestem (filename without extensions) to the Context, see ContextBuilder.register_font_from_file The paths are relative to the base directory. Only the last of with_font_files, with_font_file, or with_font_dir will take effect.

source

pub fn with_font_file(self, file: &str) -> AppBuilder

Specifies to read the specified single TTF file as a font for use in your theme. The font will be registered with an ID of the filestem (filename without extensions) to the Context, see ContextBuilder.register_font_from_file The paths are relative to the base directory. Only the last of with_font_files, with_font_file, or with_font_dir will take effect.

source

pub fn with_font_dir(self, dir: &str) -> AppBuilder

Specifies to read all TTF files in the directory as fonts for use in your theme. The fonts will be registered with an ID of the filestem (filename without extensions) to the Context, see ContextBuilder.register_font_from_file The paths are relative to the base directory. Only the last of with_font_files, with_font_file, or with_font_dir will take effect.

Examples found in repository?
examples/hello_wgpu.rs (line 8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
fn main() -> Result<(), Box<dyn std::error::Error>> {
    let app = thyme::AppBuilder::new()
        .with_logger()
        .with_title("Thyme wgpu Demo")
        .with_window_size(1280.0, 720.0)
        .with_base_dir("examples/data")
        .with_theme_files(&["themes/base.yml", "themes/pixel.yml"])
        .with_font_dir("fonts")
        .with_image_dir("images")
        .build_wgpu()?;

    app.main_loop(|ui| {
        ui.window("window", |ui| {
            ui.gap(20.0);
    
            ui.button("label", "Hello, World!");
        });
    });
}
More examples
Hide additional examples
examples/hello_glium.rs (line 8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
fn main() -> Result<(), Box<dyn std::error::Error>> {
    let app = thyme::AppBuilder::new()
        .with_logger()
        .with_title("Thyme Glium Demo")
        .with_window_size(1280.0, 720.0)
        .with_base_dir("examples/data")
        .with_theme_files(&["themes/base.yml", "themes/pixel.yml"])
        .with_font_dir("fonts")
        .with_image_dir("images")
        .build_glium()?;

    app.main_loop(|ui| {
        ui.window("window", |ui| {
            ui.gap(20.0);
    
            ui.button("label", "Hello, World!");
        });
    });
}
examples/hello_gl.rs (line 8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
fn main() -> Result<(), Box<dyn std::error::Error>> {
    let app = thyme::AppBuilder::new()
        .with_logger()
        .with_title("Thyme Gl Demo")
        .with_window_size(1280.0, 720.0)
        .with_base_dir("examples/data")
        .with_theme_files(&["themes/base.yml", "themes/pixel.yml"])
        .with_font_dir("fonts")
        .with_image_dir("images")
        .build_gl()?;

    app.main_loop(|ui| {
        ui.window("window", |ui| {
            ui.gap(20.0);
    
            ui.button("label", "Hello, World!");
        });
    });
}
source

pub fn with_image_files(self, files: &[&str]) -> AppBuilder

Specifies to read the files as images for use in your theme. The images will be registered with ID of the filestem (filename without extensions) to the Context, see ContextBuilder.register_texture_from_file The paths are relative to the base directory. Only the last of with_image_files, with_image_file, or with_image_dir will take effect.

source

pub fn with_image_file(self, file: &str) -> AppBuilder

Specifies to read the file as a single image for use in your theme. The image will be registered with ID of the filestem (filename without extensions) to the Context, see ContextBuilder.register_texture_from_file The path is relative to the base directory. Only the last of with_image_files, with_image_file, or with_image_dir will take effect.

source

pub fn with_image_dir(self, dir: &str) -> AppBuilder

Specifies to read all png and jpg files in the specified directory as images for use in yourtheme. The images will be registered with ID of the filestem (filename without extensions) to the Context, see ContextBuilder.register_texture_from_file The paths are relative to the base directory. Only the last of with_image_files, with_image_file, or with_image_dir will take effect.

Examples found in repository?
examples/hello_wgpu.rs (line 9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
fn main() -> Result<(), Box<dyn std::error::Error>> {
    let app = thyme::AppBuilder::new()
        .with_logger()
        .with_title("Thyme wgpu Demo")
        .with_window_size(1280.0, 720.0)
        .with_base_dir("examples/data")
        .with_theme_files(&["themes/base.yml", "themes/pixel.yml"])
        .with_font_dir("fonts")
        .with_image_dir("images")
        .build_wgpu()?;

    app.main_loop(|ui| {
        ui.window("window", |ui| {
            ui.gap(20.0);
    
            ui.button("label", "Hello, World!");
        });
    });
}
More examples
Hide additional examples
examples/hello_glium.rs (line 9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
fn main() -> Result<(), Box<dyn std::error::Error>> {
    let app = thyme::AppBuilder::new()
        .with_logger()
        .with_title("Thyme Glium Demo")
        .with_window_size(1280.0, 720.0)
        .with_base_dir("examples/data")
        .with_theme_files(&["themes/base.yml", "themes/pixel.yml"])
        .with_font_dir("fonts")
        .with_image_dir("images")
        .build_glium()?;

    app.main_loop(|ui| {
        ui.window("window", |ui| {
            ui.gap(20.0);
    
            ui.button("label", "Hello, World!");
        });
    });
}
examples/hello_gl.rs (line 9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
fn main() -> Result<(), Box<dyn std::error::Error>> {
    let app = thyme::AppBuilder::new()
        .with_logger()
        .with_title("Thyme Gl Demo")
        .with_window_size(1280.0, 720.0)
        .with_base_dir("examples/data")
        .with_theme_files(&["themes/base.yml", "themes/pixel.yml"])
        .with_font_dir("fonts")
        .with_image_dir("images")
        .build_gl()?;

    app.main_loop(|ui| {
        ui.window("window", |ui| {
            ui.gap(20.0);
    
            ui.button("label", "Hello, World!");
        });
    });
}
source

pub fn build_gl(self) -> Result<GlApp, Error>

Creates a GlApp object, setting up Thyme as specified in this builder and using the GlRenderer.

Examples found in repository?
examples/hello_gl.rs (line 10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
fn main() -> Result<(), Box<dyn std::error::Error>> {
    let app = thyme::AppBuilder::new()
        .with_logger()
        .with_title("Thyme Gl Demo")
        .with_window_size(1280.0, 720.0)
        .with_base_dir("examples/data")
        .with_theme_files(&["themes/base.yml", "themes/pixel.yml"])
        .with_font_dir("fonts")
        .with_image_dir("images")
        .build_gl()?;

    app.main_loop(|ui| {
        ui.window("window", |ui| {
            ui.gap(20.0);
    
            ui.button("label", "Hello, World!");
        });
    });
}
source

pub fn build_glium(self) -> Result<GliumApp, Error>

Creates a GliumApp object, setting up Thyme as specified in this Builder and using the GliumRenderer.

Examples found in repository?
examples/hello_glium.rs (line 10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
fn main() -> Result<(), Box<dyn std::error::Error>> {
    let app = thyme::AppBuilder::new()
        .with_logger()
        .with_title("Thyme Glium Demo")
        .with_window_size(1280.0, 720.0)
        .with_base_dir("examples/data")
        .with_theme_files(&["themes/base.yml", "themes/pixel.yml"])
        .with_font_dir("fonts")
        .with_image_dir("images")
        .build_glium()?;

    app.main_loop(|ui| {
        ui.window("window", |ui| {
            ui.gap(20.0);
    
            ui.button("label", "Hello, World!");
        });
    });
}
source

pub fn build_wgpu(self) -> Result<WgpuApp, Error>

Creates a WgpuApp object, setting up Thyme as specified in this Builder and using the WgpuRenderer.

Examples found in repository?
examples/hello_wgpu.rs (line 10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
fn main() -> Result<(), Box<dyn std::error::Error>> {
    let app = thyme::AppBuilder::new()
        .with_logger()
        .with_title("Thyme wgpu Demo")
        .with_window_size(1280.0, 720.0)
        .with_base_dir("examples/data")
        .with_theme_files(&["themes/base.yml", "themes/pixel.yml"])
        .with_font_dir("fonts")
        .with_image_dir("images")
        .build_wgpu()?;

    app.main_loop(|ui| {
        ui.window("window", |ui| {
            ui.gap(20.0);
    
            ui.button("label", "Hello, World!");
        });
    });
}

Trait Implementations§

source§

impl Default for AppBuilder

source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Downcast<T> for T

§

fn downcast(&self) -> &T

source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> Upcast<T> for T

§

fn upcast(&self) -> Option<&T>