vultr 0.4.3

A pure Rust Vultr API binding.
Documentation
use serde::Deserialize;

#[derive(Deserialize, Debug)]
pub struct VultrDomainsRoot {
    pub domains: Vec<VultrDomain>,
}

#[derive(Deserialize, Debug)]
pub struct VultrDomainRoot {
    pub domain: VultrDomain,
}

/// A DNS domain managed by Vultr.
#[derive(Deserialize, Debug)]
pub struct VultrDomain {
    /// The domain name (e.g. `"example.com"`).
    pub domain: String,
    /// ISO 8601 date when the domain was created.
    pub date_created: String,
}

#[derive(Deserialize, Debug)]
pub struct VultrDomainRecordsRoot {
    pub records: Vec<VultrDomainRecord>,
}

#[derive(Deserialize, Debug)]
pub struct VultrDomainRecordRoot {
    pub record: VultrDomainRecord,
}

/// A DNS record within a Vultr-managed domain.
#[derive(Deserialize, Debug)]
pub struct VultrDomainRecord {
    /// Unique identifier for this record.
    pub id: String,
    /// Record type (e.g. `"A"`, `"MX"`, `"TXT"`).
    #[serde(rename = "type")]
    pub record_type: String,
    /// Subdomain name, or empty string for the apex record.
    pub name: String,
    /// Record value (e.g. an IP address or hostname).
    pub data: String,
    /// Priority used for MX and SRV records.
    pub priority: i32,
    /// Time-to-live in seconds.
    pub ttl: u32,
}