dnsclientx 0.5.0

A small, simple and secure DNS client library
Documentation
1
2
3
4
5
6
7
8
use std::io::{Error, ErrorKind};

pub fn as_io_error<E>(kind: ErrorKind) -> impl Fn(E) -> Error
where
    E: Into<Box<dyn std::error::Error + Send + Sync>>,
{
    move |e: E| Error::new(kind, e)
}