use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum SpecSource {
TypeAlias,
Comment,
Inferred,
}
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub enum ConstraintKind {
Range {
min: Option<i64>,
max: Option<i64>,
},
Pattern(String),
Invariant(String),
DependsOn(String),
Intent(IntentKind),
Custom {
key: String,
value: String,
},
}
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum IntentKind {
Design,
Performance,
Security,
Business,
Custom(String),
}
#[derive(Debug, Clone, PartialEq, Eq)]
pub enum CommentDirective {
Group(String),
Related(Vec<String>),
DependsOn(Vec<String>),
PartOf(String),
Invariant(String),
Intent(String),
Custom {
key: String,
value: String,
},
}