pub const READ_CLONES: &str = "esi-clones.read_clones.v1";
pub const READ_IMPLANTS: &str = "esi-clones.read_implants.v1";
pub struct ClonesScopes {
pub(super) scopes: Vec<String>,
}
impl Default for ClonesScopes {
fn default() -> Self {
Self::new()
}
}
impl ClonesScopes {
pub fn new() -> Self {
ClonesScopes { scopes: Vec::new() }
}
pub fn all() -> Self {
ClonesScopes::new().read_clones().read_implants()
}
pub fn read_clones(mut self) -> Self {
self.scopes.push(READ_CLONES.to_string());
self
}
pub fn read_implants(mut self) -> Self {
self.scopes.push(READ_IMPLANTS.to_string());
self
}
}
#[cfg(test)]
mod clones_scopes_tests {
use crate::scope::ClonesScopes;
#[test]
fn test_clones_scopes_default() {
let clones_scopes = ClonesScopes::default();
assert_eq!(clones_scopes.scopes.len(), 0)
}
}