pub fn declare_adapter_controls(
adapters: &HashMap<String, Arc<dyn DriverAdapter>>,
component: &Arc<RwLock<Component>>,
)Expand description
Invoke DriverAdapter::declare_controls for each unique adapter
instance against the given parent component, deduping by
Arc-pointer identity. The same adapter Arc may be entered
into the map under multiple alias keys; this guarantees each
physical instance gets exactly one declaration call per
invocation of this helper.
Called from two sites:
- The phase executor at component-attach time, so
dryrun=controlswalks a populated tree before any cycles run. Activity::run_with_adaptersat run start, so adapters that only ever materialize at run time still get declared.
Adapter implementations are expected to be idempotent — calling this helper twice against the same parent must not produce duplicate subcomponents or duplicate-name control declarations.