Skip to main content

tower_rules/
version.rs

1use serde::{Deserialize, Serialize};
2use ts_rs::TS;
3
4/// Wire-format schema version for tower rules.
5///
6/// Single variant today. When a breaking field rename or removal requires a
7/// migration path, a new variant is added here. Rule files older than the
8/// running tower version migrate lazily; future-version files are skipped with
9/// a warning.
10#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize, TS)]
11#[ts(export)]
12pub enum SchemaVersion {
13    V1,
14}
15
16impl Default for SchemaVersion {
17    fn default() -> Self {
18        Self::V1
19    }
20}