pub struct ActivityManager<R, H, C>{ /* private fields */ }Expand description
任务栈与页面管理器。 维护 Activity 实例堆栈、分发生命周期、并向外暴露最终要渲染的视图层级。
Implementations§
Source§impl<R, H, C> ActivityManager<R, H, C>
impl<R, H, C> ActivityManager<R, H, C>
Sourcepub fn new(
initial_route: R,
context: C,
factory: Box<dyn Fn(&R, &C) -> Box<dyn Activity<R, H, C>>>,
) -> (Self, Vec<H::Effect>)
pub fn new( initial_route: R, context: C, factory: Box<dyn Fn(&R, &C) -> Box<dyn Activity<R, H, C>>>, ) -> (Self, Vec<H::Effect>)
初始化 Activity Manager 并启动初始根页面。
Sourcepub fn start_activity(&mut self, intent: Intent<R>) -> Vec<H::Effect>
pub fn start_activity(&mut self, intent: Intent<R>) -> Vec<H::Effect>
启动目标 Activity,处理复杂的 LaunchMode 出入栈逻辑。
Sourcepub fn subscriptions(&self) -> Vec<H::Subscription>
pub fn subscriptions(&self) -> Vec<H::Subscription>
提取需要监听的订阅事件(同样受 translucent 机制影响)。
Auto Trait Implementations§
impl<R, H, C> Freeze for ActivityManager<R, H, C>where
C: Freeze,
impl<R, H, C> !RefUnwindSafe for ActivityManager<R, H, C>
impl<R, H, C> !Send for ActivityManager<R, H, C>
impl<R, H, C> !Sync for ActivityManager<R, H, C>
impl<R, H, C> Unpin for ActivityManager<R, H, C>where
C: Unpin,
impl<R, H, C> UnsafeUnpin for ActivityManager<R, H, C>where
C: UnsafeUnpin,
impl<R, H, C> !UnwindSafe for ActivityManager<R, H, C>
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