slint-ui-templates 0.1.0

Composable Slint UI building blocks — mother-child pattern, token-driven
Documentation
1
2
3
4
5
6
7
8
9
use std::path::Path;
use crate::grid::config::TargetConfig;

/// Reads and deserializes a target configuration from a TOML file.
pub fn load(path: &Path) -> Result<TargetConfig, Box<dyn std::error::Error>> {
    let content = std::fs::read_to_string(path)?;
    let config: TargetConfig = toml::from_str(&content)?;
    Ok(config)
}