pub trait AppExt {
// Required methods
fn add_scene(&mut self, scene: Scene) -> &mut Self;
fn scenes(&self) -> &[Scene];
fn scene(&self, name: &str) -> Option<Scene>;
// Provided methods
fn add_scenes(
&mut self,
scenes: impl IntoIterator<Item = Scene>,
) -> &mut Self { ... }
fn first_scene(&self) -> Option<Scene> { ... }
}Expand description
Scene registration and selection for a project App.
Required Methods§
Provided Methods§
Sourcefn add_scenes(&mut self, scenes: impl IntoIterator<Item = Scene>) -> &mut Self
fn add_scenes(&mut self, scenes: impl IntoIterator<Item = Scene>) -> &mut Self
Register scenes in iteration order.
§Panics
Panics if any scene name is already registered, including duplicate names within this collection.
Sourcefn first_scene(&self) -> Option<Scene>
fn first_scene(&self) -> Option<Scene>
Select the first registered scene, if the project has any scenes.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".