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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
#![allow(unused)]

use super::EmptyObject;

impl dysql_tpl::Content for EmptyObject {
    #[inline]
    fn capacity_hint(&self, tpl: &dysql_tpl::Template) -> usize {
        tpl.capacity_hint()
    }
    #[inline]
    fn render_section<C, E, IC>(
        &self,
        section: dysql_tpl::Section<C>,
        encoder: &mut E,
        _content: Option<&IC>,
    ) -> std::result::Result<(), E::Error>
    where
        C: dysql_tpl::traits::ContentSequence,
        E: dysql_tpl::encoding::Encoder,
    {
        section.with(self).render(encoder, Option::<&()>::None)
    }
    #[inline]
    fn apply_section<C>(
        &self,
        section: dysql_tpl::SimpleSection<C>,
    ) -> std::result::Result<dysql_tpl::SimpleValue, dysql_tpl::SimpleError>
    where
        C: dysql_tpl::traits::ContentSequence,
    {
        section.with(self).apply()
    }
    #[inline]
    fn render_notnone_section<C, E, IC>(
        &self,
        section: dysql_tpl::Section<C>,
        encoder: &mut E,
        _content: Option<&IC>,
    ) -> std::result::Result<(), E::Error>
    where
        C: dysql_tpl::traits::ContentSequence,
        E: dysql_tpl::encoding::Encoder,
    {
        section.with(self).render(encoder, Option::<&()>::None)
    }
    #[inline]
    fn render_field_escaped<E>(
        &self,
        hash: u64,
        name: &str,
        encoder: &mut E,
    ) -> std::result::Result<bool, E::Error>
    where
        E: dysql_tpl::encoding::Encoder,
    {
        match hash {
            _ => Ok(false),
        }
    }
    #[inline]
    fn render_field_unescaped<E>(
        &self,
        hash: u64,
        name: &str,
        encoder: &mut E,
    ) -> std::result::Result<bool, E::Error>
    where
        E: dysql_tpl::encoding::Encoder,
    {
        match hash {
            _ => Ok(false),
        }
    }
    #[inline]
    fn apply_field_unescaped(
        &self,
        hash: u64,
        name: &str,
    ) -> std::result::Result<dysql_tpl::SimpleValue, dysql_tpl::SimpleError> {
        match hash {
            _ => {
                Err(
                    dysql_tpl::SimpleInnerError(std::format!("the data type of field: {0} is not supported ", name)).into()
                )
            }
        }
    }
    fn render_field_section<P, E>(
        &self,
        hash: u64,
        name: &str,
        section: dysql_tpl::Section<P>,
        encoder: &mut E,
    ) -> std::result::Result<bool, E::Error>
    where
        P: dysql_tpl::traits::ContentSequence,
        E: dysql_tpl::encoding::Encoder,
    {
        match hash {
            _ => Ok(false),
        }
    }
    fn apply_field_section<P>(
        &self,
        hash: u64,
        name: &str,
        section: dysql_tpl::SimpleSection<P>,
    ) -> std::result::Result<dysql_tpl::SimpleValue, dysql_tpl::SimpleError>
    where
        P: dysql_tpl::traits::ContentSequence,
    {
        match hash {
            _ => {
                Err(
                    dysql_tpl::SimpleInnerError(std::format!("tthe data type of field is not supported")).into()
                )
            }
        }
    }
    fn render_field_inverse<P, E>(
        &self,
        hash: u64,
        name: &str,
        section: dysql_tpl::Section<P>,
        encoder: &mut E,
    ) -> std::result::Result<bool, E::Error>
    where
        P: dysql_tpl::traits::ContentSequence,
        E: dysql_tpl::encoding::Encoder,
    {
        match hash {
            _ => Ok(false),
        }
    }
    fn render_field_notnone_section<P, E>(
        &self,
        hash: u64,
        name: &str,
        section: dysql_tpl::Section<P>,
        encoder: &mut E,
    ) -> std::result::Result<bool, E::Error>
    where
        P: dysql_tpl::traits::ContentSequence,
        E: dysql_tpl::encoding::Encoder,
    {
        match hash {
            _ => Ok(false),
        }
    }
}