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.

13 lines
265 B

  1. pub trait Resource {
  2. fn get_type(&self) -> &str;
  3. fn get_value(&self) -> &str;
  4. }
  5. pub struct UserResource<'a> {
  6. pub name: &'a str
  7. }
  8. impl<'a> Resource for UserResource<'a> {
  9. fn get_type(&self) -> &str { "user" }
  10. fn get_value(&self) -> &str { self.name }
  11. }