arch: push wire types out of ClientApp, extract event_service, cleanup dead code
- ClientApp stores domain types, RepaintCommand carries DisplayHint + Vec<(String,Value)> - adapters no longer convert Wire→Domain (eliminated duplication in esp32 + desktop) - event_service in application layer handles LayoutChanged/WebhookDataReceived/ThemeChanged - bootstrap event_handler reduced to 10-line dispatcher - polling_service reuses event_service::apply_and_broadcast (deduplicated broadcast pattern) - AppState.config_service() replaces 11 inline ConfigService::new() calls - delete unused poll_interval_secs parameter chain - delete unused StoragePort/ClientConfig (zero implementations)
This commit is contained in:
@@ -19,7 +19,7 @@ pub use domain::{AlignItems, DisplayHintKind, HAlign, JustifyContent, VAlign};
|
||||
pub use font::{FontMetrics, FontSize};
|
||||
pub use layout_engine::LayoutEngine;
|
||||
pub use markup::{TextSpan, parse_markup};
|
||||
pub use ports::{ClientConfig, DisplayPort, NetworkPort, StoragePort};
|
||||
pub use ports::{DisplayPort, NetworkPort};
|
||||
pub use render_engine::{DrawCommand, RenderEngine};
|
||||
pub use render_tree::RenderTree;
|
||||
pub use scroll::ScrollState;
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
mod display;
|
||||
mod network;
|
||||
mod storage;
|
||||
|
||||
pub use display::DisplayPort;
|
||||
pub use network::NetworkPort;
|
||||
pub use storage::{ClientConfig, StoragePort};
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
pub struct ClientConfig {
|
||||
pub wifi_ssid: String,
|
||||
pub wifi_password: String,
|
||||
pub server_addr: String,
|
||||
}
|
||||
|
||||
pub trait StoragePort {
|
||||
type Error;
|
||||
|
||||
fn load_config(&self) -> Result<ClientConfig, Self::Error>;
|
||||
}
|
||||
Reference in New Issue
Block a user