feat: Introduce Topology Trait for Compile-Time Safe Score Binding

Introduce the `Topology` trait to ensure that `Maestro` can compile-time safely bind compatible `Scores` and `Topologies`. This refactoring includes updating `HarmonyTuiEvent`, `ScoreListWidget`, and related structures to work with generic `Topology` types, enhancing type safety and modularity.
This commit is contained in:
2025-04-02 15:51:28 -04:00
parent f7dc15cbf0
commit fc718f11cf
9 changed files with 87 additions and 64 deletions

View File

@@ -99,7 +99,10 @@ impl<T: Topology + DnsServer> Interpret<T> for DnsInterpret {
inventory: &Inventory,
topology: &T,
) -> Result<Outcome, InterpretError> {
info!("Executing {} on inventory {inventory:?}", <DnsInterpret as Interpret<T>>::get_name(self));
info!(
"Executing {} on inventory {inventory:?}",
<DnsInterpret as Interpret<T>>::get_name(self)
);
self.serve_dhcp_entries(inventory, topology).await?;
self.ensure_hosts_registered(topology).await?;