use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct KernelSpec {
pub display_name: String,
pub language: String,
pub name: String,
}
impl Default for KernelSpec {
fn default() -> Self {
Self::python3()
}
}
impl KernelSpec {
pub fn python3() -> Self {
Self {
display_name: "Python 3".to_string(),
language: "python".to_string(),
name: "python3".to_string(),
}
}
pub fn evcxr() -> Self {
Self {
display_name: "Rust".to_string(),
language: "rust".to_string(),
name: "rust".to_string(),
}
}
pub fn julia() -> Self {
Self {
display_name: "Julia 1.9".to_string(),
language: "julia".to_string(),
name: "julia-1.9".to_string(),
}
}
}