web_url/url/
display.rs

1use std::fmt::{Display, Formatter};
2
3use crate::WebUrl;
4
5impl WebUrl {
6    //! Display
7
8    /// Gets the URL string.
9    pub fn as_str(&self) -> &str {
10        self.url.as_str()
11    }
12}
13
14impl AsRef<str> for WebUrl {
15    fn as_ref(&self) -> &str {
16        self.as_str()
17    }
18}
19
20impl Display for WebUrl {
21    fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
22        write!(f, "{}", self.url)
23    }
24}