pillow_http/
uri.rs

1/// Http URI
2///
3/// # Examples
4///
5/// ```rust
6/// Uri("/usrs/01".to_string())
7/// ```
8#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Clone)]
9pub struct Uri(pub String);
10
11impl Uri {
12    /// Get the value in Uri
13    pub fn value(&self) -> String {
14        self.0.clone()
15    }
16}
17
18impl std::fmt::Display for Uri {
19    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
20        write!(f, "{}", self)
21    }
22}