pub const READ_STRUCTURES: &str = "esi-universe.read_structures.v1";
pub struct UniverseScopes {
pub(super) scopes: Vec<String>,
}
impl Default for UniverseScopes {
fn default() -> Self {
Self::new()
}
}
impl UniverseScopes {
pub fn new() -> Self {
UniverseScopes { scopes: Vec::new() }
}
pub fn all() -> Self {
UniverseScopes::new().read_structures()
}
pub fn read_structures(mut self) -> Self {
self.scopes.push(READ_STRUCTURES.to_string());
self
}
}
#[cfg(test)]
mod universe_scopes_tests {
use crate::scope::UniverseScopes;
#[test]
fn test_universe_scopes_default() {
let universe_scopes = UniverseScopes::default();
assert_eq!(universe_scopes.scopes.len(), 0)
}
}