chiark / gitweb /
substitutions in string values
[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::{BTreeSet, HashMap};
6 pub use std::cmp::{min, max};
7 pub use std::fs;
8 pub use std::fmt::{self, Debug, Display};
9 pub use std::io::{self, ErrorKind, Read as _};
10 pub use std::iter;
11 pub use std::mem;
12 pub use std::net::{IpAddr, Ipv4Addr};
13 pub use std::path::{Path, PathBuf};
14 pub use std::panic;
15 pub use std::process;
16 pub use std::str::FromStr;
17 pub use std::sync::Arc;
18
19 pub use anyhow::{anyhow, Context};
20 pub use extend::ext;
21 pub use fehler::{throw, throws};
22 pub use futures::future;
23 pub use hyper::Uri;
24 pub use hyper_tls::HttpsConnector;
25 pub use ipnet::IpNet;
26 pub use itertools::{iproduct, Itertools};
27 pub use lazy_regex::{regex_is_match, regex_replace_all};
28 pub use log::{debug, info, error};
29 pub use structopt::StructOpt;
30 pub use tokio::task;
31 pub use tokio::time::Duration;
32 pub use void::{self, Void, ResultVoidExt, ResultVoidErrExt};
33
34 pub use crate::config::{self, InstanceConfig};
35 pub use crate::utils::*;
36 pub use crate::types::*;
37
38 pub use anyhow::Error as AE;
39 pub use ErrorKind as EK;
40
41 pub fn default<T:Default>() -> T { Default::default() }