use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
pub enum ResonatorProfile {
Human,
World,
Coordination,
IBank,
}
impl ResonatorProfile {
pub fn requires_agency_protection(&self) -> bool {
matches!(self, ResonatorProfile::Human)
}
pub fn requires_audit_trail(&self) -> bool {
matches!(self, ResonatorProfile::IBank)
}
pub fn prefers_reversibility(&self) -> bool {
matches!(self, ResonatorProfile::World | ResonatorProfile::IBank)
}
pub fn can_couple_with(&self, other: &ResonatorProfile) -> bool {
match (self, other) {
(ResonatorProfile::Human, ResonatorProfile::IBank) => false,
(ResonatorProfile::IBank, ResonatorProfile::Human) => false,
(ResonatorProfile::IBank, ResonatorProfile::IBank) => true,
(ResonatorProfile::IBank, _) => false,
(_, ResonatorProfile::IBank) => false,
_ => true,
}
}
}
impl Default for ResonatorProfile {
fn default() -> Self {
ResonatorProfile::Coordination
}
}