A library for writing host-specific, single-binary configuration management and deployment tools
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

7 years ago
  1. #[derive(PartialEq, Eq, Hash, Clone)]
  2. pub struct Resource(pub String, pub String);
  3. impl<'a> Resource {
  4. pub fn new<A: Into<String>, B: Into<String>>(rtype: A, value: B) -> Self {
  5. Self(rtype.into(), value.into())
  6. }
  7. pub fn get_type(&self) -> &str {
  8. &self.0
  9. }
  10. pub fn get_value(&self) -> &str {
  11. &self.1
  12. }
  13. }