1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
#[macro_export]
macro_rules! hdmap {
() => {
reqwest::header::HeaderMap::new()
};
($($key: expr => $value: expr),+ $(,)?) => {
{
use std::convert::TryInto;
const CAP: usize = sugars::count!($($key),*);
let mut map = reqwest::header::HeaderMap::with_capacity(CAP);
$(map.insert($key, $value.try_into().unwrap());)+
map
}
};
}
pub mod client;
pub use self::client::Client;
pub use self::client::UA;