use semver::Version; use serde::{Deserialize, Serialize}; use std::borrow::Cow; use std::sync::LazyLock; // the usage of X- has been deprecated for quite along time, it turns out pub static ATUIN_HEADER_VERSION: &str = "Atuin-Version"; pub static ATUIN_CARGO_VERSION: &str = env!("CARGO_PKG_VERSION"); pub static ATUIN_VERSION: LazyLock = LazyLock::new(|| Version::parse(ATUIN_CARGO_VERSION).expect("failed to parse self semver")); #[derive(Debug, Serialize, Deserialize)] pub struct ErrorResponse<'a> { pub reason: Cow<'a, str>, } #[derive(Debug, Serialize, Deserialize)] pub struct IndexResponse { pub homage: String, pub version: String, }