pub struct LifecycleDispatcher { /* private fields */ }Implementations§
Source§impl LifecycleDispatcher
impl LifecycleDispatcher
pub fn set_callback(&self, callback: Box<dyn Fn(AppLifecycle) + Send>)
pub fn add_listener(&self, callback: Box<dyn Fn(AppLifecycle) + Send>) -> u64
pub fn remove_listener(&self, id: u64) -> bool
pub fn current(&self) -> Option<AppLifecycle>
pub fn push(&self, state: AppLifecycle)
pub fn process(&self)
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for LifecycleDispatcher
impl Forget for LifecycleDispatcher
impl Move for LifecycleDispatcher
impl RefUnwindSafe for LifecycleDispatcherwhere
Atomic<u8>: RefUnwindSafe,
Mutex<Option<Arc<LifecycleSlot>>>: RefUnwindSafe,
Mutex<Vec<AppLifecycle>>: RefUnwindSafe,
Mutex<Vec<LifecycleEntry>>: RefUnwindSafe,
Atomic<u64>: RefUnwindSafe,
Mutex<()>: RefUnwindSafe,
impl Send for LifecycleDispatcher
impl Sync for LifecycleDispatcher
impl Unpin for LifecycleDispatcher
impl UnsafeUnpin for LifecycleDispatcherwhere
Align1<u8>: UnsafeUnpin,
Align4<u32>: UnsafeUnpin,
*const ArcInner<LifecycleSlot> is !null: UnsafeUnpin,
PhantomData<ArcInner<LifecycleSlot>>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<AppLifecycle>: UnsafeUnpin,
PhantomData<LifecycleEntry>: UnsafeUnpin,
Align8<u64>: UnsafeUnpin,
impl UnwindSafe for LifecycleDispatcherwhere
Align1<u8>: UnwindSafe,
Mutex<Option<Arc<LifecycleSlot>>>: UnwindSafe,
Mutex<Vec<AppLifecycle>>: UnwindSafe,
Mutex<Vec<LifecycleEntry>>: UnwindSafe,
Align8<u64>: UnwindSafe,
Mutex<()>: UnwindSafe,
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