libknot 0.2.3

High Level bindings to a subset of libknot, the library of the knot dns server
Documentation
//#![deny(elided_lifetimes_in_paths)]

#[cfg(feature = "native")]
extern crate libknot_sys;
extern crate byteorder;
extern crate log;

#[cfg(feature = "async")]
pub mod r#async;
mod common;
pub mod conf;
pub mod error;
#[cfg(feature = "native")]
pub mod native;
pub mod sync;
mod util;

pub use common::ControlMessage;
pub use common::KnotSync;
use std::borrow::Cow;

pub fn dns_name_with_dot(name: &str) -> Cow<str> {
    if name.ends_with('.') {
        Cow::Borrowed(name)
    } else {
        let mut ret = String::with_capacity(name.len() + 1);
        ret.push_str(name);
        ret.push('.');
        Cow::from(ret)
    }
}