Skip to main content

pdns_client/
lib.rs

1//! # `pdns_client`
2//!
3//! This library crate provides a blocking/synchronous client for interacting with the `PowerDNS` Authoritative Server API.
4//!
5//! # Examples
6//!
7//! ```no_run
8//! fn main() -> Result<(), Box<dyn std::error::Error>>{
9//!     let client = pdns_client::Client::new("http://127.0.0.1:8081", "api_key")?;
10//!     let servers = client.list_servers()?;
11//!
12//!     for server in servers {
13//!         println!(
14//!             "pdns server with id={}, daemon_type={}",
15//!             server.id, server.daemon_type
16//!         );
17//!     }
18//!
19//!     Ok(())
20//! }
21//! ```
22
23// ////////////////////////////
24// PUBLIC API EXPORTSS
25// ////////////////////////////
26
27mod client;
28pub use client::*; // this is meant to be a one module crate. glob operator usage to keep re-export code simple is thus acceptable