Skip to main content

Scene

Trait Scene 

Source
pub trait Scene {
    // Required methods
    fn name(&self) -> &'static str;
    fn build(&self) -> WidgetNode;
}
Expand description

命名场景:稳定名字 + 构建函数。注册进 SceneRegistry 后由 CLI 按名选取。

Required Methods§

Source

fn name(&self) -> &'static str

稳定场景名(CLI --scene <name> 用)。

Source

fn build(&self) -> WidgetNode

构建根 widget 树(仍是现有 WidgetNode,不引入第二棵树)。

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§