#[derive(Debug, Clone, Copy, PartialEq, Eq, Default)]
pub enum ApiVersion {
#[default]
V2,
}
impl ApiVersion {
pub fn path(&self) -> &'static str {
match self {
ApiVersion::V2 => "/v2",
}
}
}
impl std::fmt::Display for ApiVersion {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
ApiVersion::V2 => write!(f, "v2"),
}
}
}