pub trait ModuleLifecycle {
// Required methods
fn on_created(&mut self);
fn on_destroyed(&mut self);
fn on_state_changed(&mut self, state: Value);
}Expand description
Lifecycle callbacks for a module
Required Methods§
Sourcefn on_created(&mut self)
fn on_created(&mut self)
Called when module is first created
Sourcefn on_destroyed(&mut self)
fn on_destroyed(&mut self)
Called when module is destroyed
Sourcefn on_state_changed(&mut self, state: Value)
fn on_state_changed(&mut self, state: Value)
Called when state is updated from the host