Skip to main content

safe_migrate/model/
types.rs

1// FILE: ./src/model/types.rs
2use crate::ast::identifiers::ObjectId;
3
4#[derive(Debug, Clone, PartialEq)]
5pub struct TypeState {
6    pub id: ObjectId,
7    pub generation: u64,
8    pub kind: TypeKind,
9}
10
11#[derive(Debug, Clone, PartialEq)]
12pub enum TypeKind {
13    Enum { variants: Vec<String> },
14    Domain { base_type: String },
15    Base,
16    Composite,
17    Range,
18}
19
20#[derive(Debug, Clone, PartialEq)]
21pub enum TypeOverlay {
22    Present(TypeState),
23    Dropped,
24}