pub struct UncheckedActivityId { /* private fields */ }
Expand description
Pointer to an activity that has been registered. Can be used to set the lifecycle stats of activities.
The information about the activity’s type is lost at this point. Therefore, this id cannot be used to register closures.
Implementations§
Source§impl UncheckedActivityId
impl UncheckedActivityId
Sourcepub fn set_status(&self, status: LifecycleStatus)
pub fn set_status(&self, status: LifecycleStatus)
Changes the lifecycle status of the activity
§Panics
If status is set to something other than Deleted after it has been Deleted
Sourcepub fn private_message<A: Any>(&self, msg: A)
pub fn private_message<A: Any>(&self, msg: A)
Publish a message to a specific activity.
If you lack access to an UncheckedActivityId
, use nuts::send_to()
, it is equivalent.
Sourcepub fn as_usize(&self) -> usize
pub fn as_usize(&self) -> usize
A unique number for the activity.
Can be used for serialization in combination with forge_from_usize
Sourcepub fn forge_from_usize(index: usize) -> Self
pub fn forge_from_usize(index: usize) -> Self
Can be used for deserialization in combination with as_usize
If used in any other way, you might experience panics. Right now, there should still be no UB but that might change in future versions.
Trait Implementations§
Source§impl Clone for UncheckedActivityId
impl Clone for UncheckedActivityId
Source§fn clone(&self) -> UncheckedActivityId
fn clone(&self) -> UncheckedActivityId
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more