Skip to main content

schema_core/config/
schema.rs

1use nutype::nutype;
2
3#[nutype(
4    sanitize(trim, lowercase),
5    validate(len_char_max = 63, regex = r"^[a-z_][a-z0-9_]*$"),
6    derive(
7        Debug,
8        Clone,
9        Display,
10        Default,
11        AsRef,
12        Deref,
13        Hash,
14        Eq,
15        PartialEq,
16        Serialize,
17        Deserialize
18    ),
19    default = "public"
20)]
21pub struct DatabaseSchema(String);