Skip to main content

eure_codegen_ir/
ids.rs

1#[derive(Debug, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)]
2pub struct TypeId(pub String);
3
4#[derive(Debug, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)]
5pub struct QualifiedTypeName {
6    pub namespace: Option<String>,
7    pub name: String,
8}
9
10impl QualifiedTypeName {
11    pub fn new(namespace: Option<String>, name: impl Into<String>) -> Self {
12        Self {
13            namespace,
14            name: name.into(),
15        }
16    }
17
18    pub fn local(name: impl Into<String>) -> Self {
19        Self {
20            namespace: None,
21            name: name.into(),
22        }
23    }
24}
25
26#[derive(Debug, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)]
27pub struct RustPathIr {
28    pub path: String,
29}
30
31impl RustPathIr {
32    pub fn new(path: impl Into<String>) -> Self {
33        Self { path: path.into() }
34    }
35}
36
37#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, PartialOrd, Ord)]
38pub struct SchemaNodeIrId(pub usize);