pub async fn run_power_element<'a>(
element_name: &'a str,
required_level_proxy: &'a RequiredLevelProxy,
initial_level: PowerLevel,
inspect_node: Option<Node>,
update_fn: Box<dyn Fn(PowerLevel) -> LocalBoxFuture<'a, ()> + 'a>,
)
Expand description
Runs a procedure that calls an update function when the required power level changes.
The power element’s power level is expected to be updated in update_fn``. A minimal update function can be created by calling
basic_update_fn_factory`.