ali_oss/types/
canonicalized_resource.rs

1#[derive(Debug)]
2pub struct CanonicalizedResource(String);
3
4impl Default for CanonicalizedResource {
5	fn default() -> Self {
6		Self("/".to_string())
7	}
8}
9
10impl CanonicalizedResource {
11	pub fn new<T: ToString>(resource: T) -> Self {
12		Self(resource.to_string())
13	}
14	pub fn as_str(&self) -> &str {
15		&self.0
16	}
17}