You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
328 B
15 lines
328 B
#[derive(PartialEq, Eq, Hash, Clone)]
|
|
pub struct Resource(pub String, pub String);
|
|
|
|
impl<'a> Resource {
|
|
pub fn new<A: Into<String>, B: Into<String>>(rtype: A, value: B) -> Self {
|
|
Self(rtype.into(), value.into())
|
|
}
|
|
|
|
pub fn get_type(&self) -> &str {
|
|
&self.0
|
|
}
|
|
pub fn get_value(&self) -> &str {
|
|
&self.1
|
|
}
|
|
}
|