1pub const VERSION_LETTER: &str = "v-pocket-R3B1-ncR2<";
8
9pub const VERSION_DATE: &str = "03252025";
11
12pub const VERSION_STRING: &str = "Pocket v-pocket-R3B1-ncR2< (03252025 - Plugin System)";
14
15pub const COMPATIBILITY: Option<&str> = Some("Compatibility only extends to basic functions of Pocket and does not include any VCS support or Plugin support");
17
18pub fn get_version_letter() -> &'static str {
20 VERSION_LETTER
21}
22
23pub fn get_version_date() -> &'static str {
25 VERSION_DATE
26}
27
28pub fn get_version_string() -> &'static str {
30 VERSION_STRING
31}
32
33pub fn get_version() -> Version {
35 Version {
36 letter: VERSION_LETTER,
37 date: VERSION_DATE,
38 semver: env!("CARGO_PKG_VERSION"),
39 name: "Plugin System",
40 compatibility: COMPATIBILITY,
41 stability: Stability::Beta,
42 }
43}
44
45pub enum Stability {
47 Alpha,
49
50 Beta,
52
53 Candidate,
55
56 Release,
58}
59
60impl std::fmt::Display for Stability {
61 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
62 match self {
63 Stability::Alpha => write!(f, "Alpha"),
64 Stability::Beta => write!(f, "Beta"),
65 Stability::Candidate => write!(f, "Candidate"),
66 Stability::Release => write!(f, "Release"),
67 }
68 }
69}
70
71pub struct Version {
73 pub letter: &'static str,
75
76 pub date: &'static str,
78
79 pub semver: &'static str,
81
82 pub name: &'static str,
84
85 pub compatibility: Option<&'static str>,
87
88 pub stability: Stability,
90}
91
92impl std::fmt::Display for Version {
93 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
94 write!(f, "{}", self.letter)?;
95
96 if let Some(compat) = self.compatibility {
97 write!(f, "-{}", compat)?;
98 }
99
100 write!(f, " ({})", self.name)
101 }
102}