teo_runtime/app/runtime_version/
mod.rs1use std::fmt::Display;
2
3#[derive(Clone, Debug)]
4pub enum RuntimeVersion {
5 Rust(&'static str),
6 NodeJS(String),
7 Python(String),
8}
9
10impl Display for RuntimeVersion {
11 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
12 let str = match self {
13 RuntimeVersion::Rust(v) => format!("Rust {v}"),
14 RuntimeVersion::NodeJS(v) => format!("Node.js {v}"),
15 RuntimeVersion::Python(v) => format!("Python {v}"),
16 };
17 write!(f, "{}", str)
18 }
19}