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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
//! URI handling function constants
//!
//! This module contains a few constants used to handle decoding and encoding for URI handling
//! functions. They make it easier and more performant to compare different ranges and code points.
use RangeInclusive;
/// A range containing all the lowercase `uriAlpha` code points.
///
/// More information:
/// - [ECMAScript reference][spec]
///
/// [spec]: https://tc39.es/ecma262/#prod-uriAlpha
const URI_ALPHA_LOWER: = b'a' as u16..=b'z' as u16;
/// A range containing all the uppercase `uriAlpha` code points.
///
/// More information:
/// - [ECMAScript reference][spec]
///
/// [spec]: https://tc39.es/ecma262/#prod-uriAlpha
const URI_ALPHA_UPPER: = b'A' as u16..=b'Z' as u16;
/// A range containing all the `DecimalDigit` code points.
///
/// More information:
/// - [ECMAScript reference][spec]
///
/// [spec]: https://tc39.es/ecma262/#prod-DecimalDigit
const DECIMAL_DIGIT: = b'0' as u16..=b'9' as u16;
/// An array containing all the `uriMark` code points.
///
/// More information:
/// - [ECMAScript reference][spec]
///
/// [spec]: https://tc39.es/ecma262/#prod-uriMark
const URI_MARK: = ;
/// An array containing all the `uriReserved` code points.
///
/// More information:
/// - [ECMAScript reference][spec]
///
/// [spec]: https://tc39.es/ecma262/#prod-uriReserved
const URI_RESERVED: = ;
/// The number sign (`#`) symbol as a UTF-16 code potint.
const NUMBER_SIGN: u16 = b'#' as u16;
/// Constant with all the unescaped URI characters.
///
/// Contains `uriAlpha`, `DecimalDigit` and `uriMark`.
///
/// More information:
/// - [ECMAScript reference][spec]
///
/// [spec]: https://tc39.es/ecma262/#prod-uriUnescaped
pub
/// Constant with all the reserved URI characters, plus the number sign symbol (`#`).
///
/// More information:
/// - [ECMAScript reference][spec]
///
/// [spec]: https://tc39.es/ecma262/#prod-uriReserved
pub
/// Constant with all the reserved and unescaped URI characters, plus the number sign symbol (`#`).
///
/// More information:
/// - [`uriReserved` in ECMAScript spec][uri_reserved]
/// - [`uriUnescaped` in ECMAScript spec][uri_unescaped]
///
/// [uri_reserved]: https://tc39.es/ecma262/#prod-uriReserved
/// [uri_unescaped]: https://tc39.es/ecma262/#prod-uriUnescaped
pub