WIP Repository and resources
This commit is contained in:
parent
4be608a002
commit
124b639e50
4 changed files with 50 additions and 4 deletions
13
src/resources/mod.rs
Normal file
13
src/resources/mod.rs
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
pub trait Resource {
|
||||
fn get_type(&self) -> &str;
|
||||
fn get_value(&self) -> &str;
|
||||
}
|
||||
|
||||
pub struct UserResource<'a> {
|
||||
pub name: &'a str
|
||||
}
|
||||
|
||||
impl<'a> Resource for UserResource<'a> {
|
||||
fn get_type(&self) -> &str { "user" }
|
||||
fn get_value(&self) -> &str { self.name }
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue