2 extern crate strum_macros;
4 extern crate smart_default;
17 use std::{fmt, time::Duration};
19 pub type ConnectionId = usize;
21 pub const REQWEST_TIMEOUT: Duration = Duration::from_secs(10);
23 #[derive(PartialEq, Eq, Hash, Debug, Clone)]
24 pub struct IpAddr(pub String);
26 impl fmt::Display for IpAddr {
27 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
28 write!(f, "{}", self.0)
33 macro_rules! location_info {
36 "None value at {}:{}, column {}",