fluent_uri/encoding/
encoder.rs1#![allow(missing_debug_implementations)]
2
3use super::{table::*, Encoder, Table};
6
7#[derive(Clone, Copy)]
9pub struct Userinfo(());
10
11impl Encoder for Userinfo {
12 const TABLE: &'static Table = USERINFO;
13}
14
15#[derive(Clone, Copy)]
17pub struct IUserinfo(());
18
19impl Encoder for IUserinfo {
20 const TABLE: &'static Table = IUSERINFO;
21}
22
23#[derive(Clone, Copy)]
25#[cfg_attr(fuzzing, derive(PartialEq, Eq))]
26pub struct RegName(());
27
28impl Encoder for RegName {
29 const TABLE: &'static Table = REG_NAME;
30}
31
32#[derive(Clone, Copy)]
34pub struct IRegName(());
35
36impl Encoder for IRegName {
37 const TABLE: &'static Table = IREG_NAME;
38}
39
40#[derive(Clone, Copy)]
42pub struct Port(());
43
44impl Encoder for Port {
45 const TABLE: &'static Table = DIGIT;
46}
47
48#[derive(Clone, Copy)]
54pub struct Path(());
55
56impl Encoder for Path {
57 const TABLE: &'static Table = PATH;
58}
59
60#[derive(Clone, Copy)]
66pub struct IPath(());
67
68impl Encoder for IPath {
69 const TABLE: &'static Table = IPATH;
70}
71
72#[derive(Clone, Copy)]
74pub struct Query(());
75
76impl Encoder for Query {
77 const TABLE: &'static Table = QUERY;
78}
79
80#[derive(Clone, Copy)]
82pub struct IQuery(());
83
84impl Encoder for IQuery {
85 const TABLE: &'static Table = IQUERY;
86}
87
88#[derive(Clone, Copy)]
90pub struct Fragment(());
91
92impl Encoder for Fragment {
93 const TABLE: &'static Table = FRAGMENT;
94}
95
96#[derive(Clone, Copy)]
98pub struct IFragment(());
99
100impl Encoder for IFragment {
101 const TABLE: &'static Table = IFRAGMENT;
102}
103
104#[derive(Clone, Copy)]
109pub struct Data(());
110
111impl Encoder for Data {
112 const TABLE: &'static Table = &UNRESERVED.or_pct_encoded();
113}
114
115#[derive(Clone, Copy)]
120pub struct IData(());
121
122impl Encoder for IData {
123 const TABLE: &'static Table = &UNRESERVED.or_pct_encoded().or_ucschar();
124}