Skip to main content

schema_core/common/
sink_name.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        AsRef,
11        Deref,
12        Hash,
13        Eq,
14        PartialEq,
15        Ord,
16        PartialOrd,
17        Serialize,
18        Deserialize
19    )
20)]
21pub struct SinkName(String);