Module http_serde_ext::authority
source · Expand description
Serialize
/Deserialize
for http::uri::Authority
use std::{cmp::Ord, collections::*, hash::Hash};
use http::uri::Authority;
use serde::{Serialize, Deserialize};
#[derive(Serialize, Deserialize)]
struct MyStruct<T>
where
T: Serialize + for<'a> Deserialize<'a> + Hash + Ord,
{
#[serde(with = "http_serde_ext::authority")]
base: Authority,
#[serde(with = "http_serde_ext::authority::option")]
option: Option<Authority>,
#[serde(with = "http_serde_ext::authority::vec")]
vec: Vec<Authority>,
#[serde(with = "http_serde_ext::authority::vec_deque")]
vec_deque: VecDeque<Authority>,
#[serde(with = "http_serde_ext::authority::linked_list")]
linked_list: LinkedList<Authority>,
#[serde(with = "http_serde_ext::authority::hash_map")]
hash_map: HashMap<T, Authority>,
#[serde(with = "http_serde_ext::authority::btree_map")]
btree_map: BTreeMap<T, Authority>,
}