chiark / gitweb /
wip resolve
[hippotat.git] / src / prelude.rs
1 // Copyright 2021 Ian Jackson and contributors to Hippotat
2 // SPDX-License-Identifier: AGPL-3.0-or-later
3 // There is NO WARRANTY.
4
5 pub use std::collections::HashMap;
6 pub use std::cmp::{min, max};
7 pub use std::fs;
8 pub use std::fmt::Debug;
9 pub use std::io::{self, ErrorKind, Read as _};
10 pub use std::mem;
11 pub use std::net::{IpAddr, Ipv4Addr};
12 pub use std::path::{Path, PathBuf};
13 pub use std::str::FromStr;
14 pub use std::sync::Arc;
15
16 pub use anyhow::{anyhow, Context};
17 pub use extend::ext;
18 pub use fehler::{throw, throws};
19 pub use hyper::Uri;
20 pub use itertools::Itertools;
21 pub use lazy_regex::regex_is_match;
22 pub use structopt::StructOpt;
23 pub use tokio::time::Duration;
24 pub use void::{self, Void};
25
26 pub use crate::config;
27 pub use crate::utils::*;
28 pub use crate::types::*;
29
30 pub use anyhow::Error as AE;
31 pub use ErrorKind as EK;
32
33 pub fn default<T:Default>() -> T { Default::default() }