1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
//! Generic URI validation.
//!
//! The atproto lexicon `format: uri` constraint is deliberately loose
//! — it matches anything of the shape `<scheme>:<rest>` where
//! `<scheme>` starts with an ASCII letter and contains only
//! `[A-Za-z0-9+.-]`. Mirrors TS `@atproto/syntax::isValidUri`.
/// `true` when `s` parses as a minimally-valid URI — an RFC 3986
/// scheme followed by a colon and at least one further character.
///
/// Does *not* attempt full RFC 3986 parsing: atproto needs to match
/// `did:`, `at:`, `https:`, `mailto:`, `http:`, etc. without pulling
/// in a full URL parser at the syntax layer.