Skip to main content

icydb_model/base/types/
ident.rs

1//! Module: base::types::ident
2//!
3//! Responsibility: base domain type declarations.
4//! Does not own: runtime storage, query execution, or validator implementation internals.
5//! Boundary: declares macro-modeled domain wrappers and records for downstream schemas.
6
7use crate::prelude::*;
8
9///
10/// Constant
11///
12
13#[newtype(
14    source_key = "crates/icydb/src/base/types/ident.rs::newtype::1",
15    primitive = "Text",
16    item(prim = "Text", unbounded),
17    ty(
18        validator(path = "base::validator::len::Range", args(1, 40)),
19        validator(path = "base::validator::text::case::UpperSnake"),
20    )
21)]
22pub struct Constant {}
23
24///
25/// Field
26///
27
28#[newtype(
29    source_key = "crates/icydb/src/base/types/ident.rs::newtype::2",
30    primitive = "Text",
31    item(prim = "Text", unbounded),
32    ty(
33        validator(path = "base::validator::len::Range", args(2, 40)),
34        validator(path = "base::validator::text::case::Snake"),
35    )
36)]
37pub struct Field {}
38
39///
40/// Function
41///
42/// 30 characters, snake_case
43///
44
45#[newtype(
46    source_key = "crates/icydb/src/base/types/ident.rs::newtype::3",
47    primitive = "Text",
48    item(prim = "Text", unbounded),
49    ty(
50        validator(path = "base::validator::len::Range", args(2, 64)),
51        validator(path = "base::validator::text::case::Snake"),
52    )
53)]
54pub struct Function {}
55
56///
57/// Variable
58///
59
60#[newtype(
61    source_key = "crates/icydb/src/base/types/ident.rs::newtype::4",
62    primitive = "Text",
63    item(prim = "Text", unbounded),
64    ty(
65        validator(path = "base::validator::len::Range", args(2, 40)),
66        validator(path = "base::validator::text::case::Snake"),
67    )
68)]
69pub struct Variable {}
70
71///
72/// Variant
73///
74
75#[newtype(
76    source_key = "crates/icydb/src/base/types/ident.rs::newtype::5",
77    primitive = "Text",
78    item(prim = "Text", unbounded),
79    ty(
80        validator(path = "base::validator::len::Range", args(1, 40)),
81        validator(path = "base::validator::text::case::UpperCamel"),
82    )
83)]
84pub struct Variant {}