Skip to main content

Route

Trait Route 

Source
pub trait Route:
    Clone
    + Debug
    + PartialEq {
    // Required methods
    fn launch_mode(&self) -> LaunchMode;
    fn is_translucent(&self) -> bool;
}
Expand description

定义路由的特征。

路由负责提供页面的启动模式以及是否为半透明页面,这决定了页面的入栈行为和视图渲染逻辑。

Required Methods§

Source

fn launch_mode(&self) -> LaunchMode

获取该路由的启动模式。

Source

fn is_translucent(&self) -> bool

指示该路由对应的页面是否为半透明。

如果为 false(不透明),渲染器将不会渲染其底部的页面。

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§