technitium 0.4.0

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

/// Stored credentials for automatic re-authentication.
#[derive(Debug, Clone)]
pub(crate) struct Credentials {
    pub username: String,
    pub password: String,
    pub totp: Option<String>,
}

/// Information about the current session.
#[derive(Debug, Clone, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct SessionInfo {
    /// The username of the authenticated user.
    pub username: Option<String>,
    /// The display name of the authenticated user.
    pub display_name: Option<String>,
    /// Session token (partial, for identification).
    pub token: Option<String>,
    /// Whether this is an API token (non-expiring).
    pub is_token: Option<bool>,
}