pub enum LaunchMode {
Standard,
SingleTop,
SingleTask,
SingleInstance,
}Expand description
Android 风格的页面启动模式。
决定了新页面启动时,如何与当前的页面堆栈进行交互。
Variants§
Standard
标准模式。
每次启动该路由,都会创建一个全新的 Activity 实例并压入栈顶。
SingleTop
栈顶复用模式。
如果目标路由已经位于栈顶,则不会创建新实例,而是调用栈顶实例的 on_new_intent;
否则,创建新实例并压入栈顶。
SingleTask
栈内复用模式。
检查整个堆栈。如果目标路由已存在于栈内,则将其上方所有的 Activity 弹出并销毁,
使其成为新的栈顶,并调用其 on_new_intent。如果不存在,则创建新实例压入栈顶。
SingleInstance
单例模式。
堆栈中仅允许存在这唯一一个页面。启动此模式的路由时,会清空栈内的所有其他页面。
Trait Implementations§
Source§impl Clone for LaunchMode
impl Clone for LaunchMode
Source§fn clone(&self) -> LaunchMode
fn clone(&self) -> LaunchMode
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LaunchMode
impl Debug for LaunchMode
Source§impl PartialEq for LaunchMode
impl PartialEq for LaunchMode
impl Copy for LaunchMode
impl Eq for LaunchMode
impl StructuralPartialEq for LaunchMode
Auto Trait Implementations§
impl Freeze for LaunchMode
impl RefUnwindSafe for LaunchMode
impl Send for LaunchMode
impl Sync for LaunchMode
impl Unpin for LaunchMode
impl UnsafeUnpin for LaunchMode
impl UnwindSafe for LaunchMode
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more