1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
pub struct CanonicalizedResource(String);

impl Default for CanonicalizedResource {
	fn default() -> Self {
		Self("/".to_string())
	}
}

impl CanonicalizedResource {
	pub fn new<T: ToString>(resource: T) -> Self {
		Self(resource.to_string())
	}
	pub fn as_str(&self) -> &str {
		&self.0
	}
}