[−][src]Trait nuts::Activity
Activities are at the core of Nuts.
From the globally managed data, they represent the active part, i.e. they can have event listeners.
The passive counter-part is defined by DomainState
.
Every struct that has a type with static lifetime (anything that has no lifetime parameter that is determined only at runtime) can be used as an Activity.
You don't have to implement the Activity
trait yourself, it will always be automatically derived if possible.
To create an activity, simply register the object that should be used as activity, using nuts::new_activity
or one of its variants.