Skip to main content

schema_core/common/
http_url.rs

1use nutype::nutype;
2
3#[nutype(
4    sanitize(trim),
5    validate(regex = r"^https?://\S+$"),
6    derive(
7        Debug,
8        Clone,
9        Display,
10        AsRef,
11        Deref,
12        Hash,
13        Eq,
14        PartialEq,
15        Serialize,
16        Deserialize
17    )
18)]
19pub struct HttpUrl(String);