///|
pub enum SchemaCompatibility {
Current
Older
Unsupported
} derive(Debug, Eq)
///|
pub fn report_schema_version() -> String {
"0.3.0"
}
///|
pub fn schema_compatibility(version : String) -> SchemaCompatibility {
match version.trim() {
"0.3.0" => Current
"0.2.0" | "0.1.0" => Older
_ => Unsupported
}
}
///|
pub fn schema_versions() -> Array[String] {
["0.1.0", "0.2.0", "0.3.0"]
}
///|
pub fn schema_accepts(version : String) -> Bool {
schema_compatibility(version) is (Current | Older)
}