I DID STUFF, GOD A PROC MACRO AND SHIT
This commit is contained in:
commit
22319e84a1
28 changed files with 3101 additions and 0 deletions
16
src/user.rs
Normal file
16
src/user.rs
Normal file
|
@ -0,0 +1,16 @@
|
|||
|
||||
pub struct User {
|
||||
username: String,
|
||||
}
|
||||
|
||||
impl User {
|
||||
pub fn default_admin() -> User {
|
||||
User {
|
||||
username: "admin".to_string(),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn login(&self, username: &str) -> bool {
|
||||
self.username == username
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue