From fc3c1d51b1be9db6ba6ad286584fbc34bb305f38 Mon Sep 17 00:00:00 2001 From: Andrew Guschin Date: Fri, 30 Oct 2026 03:32:00 +0400 Subject: Fix protected activation ordering and diagnostic review findings --- src/model.rs | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'src/model.rs') diff --git a/src/model.rs b/src/model.rs index 8966956..8229207 100644 --- a/src/model.rs +++ b/src/model.rs @@ -16,11 +16,28 @@ impl Trojan { } } +#[derive(Clone, Copy, Serialize, Deserialize, PartialEq, Eq)] +#[serde(rename_all = "lowercase")] +pub enum EntryStatus { + Supported, + Unsupported, + Invalid, +} +impl EntryStatus { + pub fn as_str(self) -> &'static str { + match self { + Self::Supported => "supported", + Self::Unsupported => "unsupported", + Self::Invalid => "invalid", + } + } +} + #[derive(Clone, Serialize, Deserialize)] pub struct Entry { pub id: String, pub name: String, - pub status: String, + pub status: EntryStatus, pub explanation: Option, pub connection: Option, } -- cgit v1.2.3