2019-08-14 15:51:59 +00:00
|
|
|
use specs::{Component, NullStorage};
|
2020-06-24 03:29:46 +00:00
|
|
|
use std::ops::Deref;
|
2019-08-09 14:22:59 +00:00
|
|
|
|
2019-08-17 18:16:58 +00:00
|
|
|
#[derive(Clone, Copy, Default)]
|
2019-08-14 15:51:59 +00:00
|
|
|
pub struct Admin;
|
2019-08-09 14:22:59 +00:00
|
|
|
|
2019-08-14 15:51:59 +00:00
|
|
|
impl Component for Admin {
|
|
|
|
type Storage = NullStorage<Self>;
|
2019-08-09 14:22:59 +00:00
|
|
|
}
|
2020-06-24 03:29:46 +00:00
|
|
|
|
|
|
|
/// List of admin usernames. This is stored as a specs resource so that the list
|
|
|
|
/// can be read by specs systems.
|
|
|
|
pub struct AdminList(pub Vec<String>);
|
|
|
|
impl Deref for AdminList {
|
|
|
|
type Target = Vec<String>;
|
|
|
|
|
|
|
|
fn deref(&self) -> &Vec<String> { &self.0 }
|
|
|
|
}
|