http_path_params/
path_param.rs

1use core::{
2    cmp::{Eq, PartialEq},
3    fmt::{Debug, Display},
4    marker::Copy,
5    str::FromStr,
6};
7
8//
9#[derive(Debug, Clone, Default)]
10pub struct PathParam<T>(pub T)
11where
12    T: FromStr + Display + Clone + Default;
13
14impl<T> Copy for PathParam<T> where T: FromStr + Display + Clone + Default + Copy {}
15
16impl<T> PartialEq for PathParam<T>
17where
18    T: FromStr + Display + Clone + Default + PartialEq,
19{
20    fn eq(&self, other: &Self) -> bool {
21        self.0 == other.0
22    }
23}
24
25impl<T> Eq for PathParam<T> where T: FromStr + Display + Clone + Default + Eq {}