power_broker_client

Function basic_update_fn_factory

Source
pub fn basic_update_fn_factory<'a>(
    power_element: &'a PowerElementContext,
) -> Box<dyn Fn(PowerLevel) -> LocalBoxFuture<'a, ()> + 'a>
Expand description

Creates an update function for run_power_element that only updates `power_element``.

This helper function can be used to create an update function that has no side effects or conditions when the power level of the given power element changes.