pub struct Activity { /* private fields */ }
Expand description
Represents some activity which cannot be ruthlessly interrupted. Obtain an Activity instance via Activity::get(). While any Activity instances are alive in the program, LifeCycle::wait_for_shutdown cannot complete.
Implementations§
source§impl Activity
impl Activity
sourcepub fn get_opt(label: String) -> Option<Self>
pub fn get_opt(label: String) -> Option<Self>
Obtain an Activity instance. If None is returned then the process is shutting down and no new activity can be initiated.
sourcepub fn get(label: String) -> Result<Self>
pub fn get(label: String) -> Result<Self>
Obtain an Activity instance. Returns Err if the process is shutting down and no new activity can be initiated
sourcepub fn is_shutting_down(&self) -> bool
pub fn is_shutting_down(&self) -> bool
Returns true if the process is shutting down.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Activity
impl RefUnwindSafe for Activity
impl Send for Activity
impl Sync for Activity
impl Unpin for Activity
impl UnwindSafe for Activity
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)