technitium 0.4.0

Typed async Rust client for the Technitium DNS Server API
Documentation
use serde::Deserialize;

/// A DNS app installed on the server.
#[derive(Debug, Clone, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct DnsApp {
    /// The app name.
    pub name: Option<String>,
    /// The app version.
    pub version: Option<String>,
    /// All other fields.
    #[serde(flatten)]
    pub extra: serde_json::Value,
}

/// Parameters for installing a DNS app.
#[derive(Debug, Clone)]
pub struct InstallApp {
    /// The app name.
    pub name: String,
    /// The app configuration (JSON string).
    pub config: Option<String>,
}

/// Response wrapper for app listing.
#[derive(Debug, Deserialize)]
#[serde(rename_all = "camelCase")]
pub(crate) struct AppListResponse {
    pub apps: Vec<DnsApp>,
}