1use super::class_requires::*;
2use super::*;
3#[allow(non_upper_case_globals, non_snake_case)]
10#[cfg_attr(feature = "json_schema", derive(schemars::JsonSchema))]
11#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
12#[derive(educe::Educe)]
13#[educe(Debug, Clone, Default, PartialEq)]
14pub struct hkbBoolVariableSequencedDataSample {
15 #[cfg_attr(
22 feature = "serde",
23 serde(skip_serializing_if = "Option::is_none", default)
24 )]
25 pub __ptr: Option<Pointer>,
26 #[cfg_attr(feature = "json_schema", schemars(rename = "time"))]
31 #[cfg_attr(feature = "serde", serde(rename = "time"))]
32 pub m_time: f32,
33 #[cfg_attr(feature = "json_schema", schemars(rename = "value"))]
38 #[cfg_attr(feature = "serde", serde(rename = "value"))]
39 pub m_value: bool,
40}
41const _: () = {
42 use havok_serde as _serde;
43 impl _serde::HavokClass for hkbBoolVariableSequencedDataSample {
44 #[inline]
45 fn name(&self) -> &'static str {
46 "hkbBoolVariableSequencedDataSample"
47 }
48 #[inline]
49 fn signature(&self) -> _serde::__private::Signature {
50 _serde::__private::Signature::new(0x514763dc)
51 }
52 #[allow(clippy::let_and_return, clippy::vec_init_then_push)]
53 fn deps_indexes(&self) -> Vec<usize> {
54 let mut v = Vec::new();
55 v
56 }
57 }
58 impl _serde::Serialize for hkbBoolVariableSequencedDataSample {
59 fn serialize<S>(&self, __serializer: S) -> Result<S::Ok, S::Error>
60 where
61 S: _serde::ser::Serializer,
62 {
63 let class_meta = self
64 .__ptr
65 .map(|name| (name, _serde::__private::Signature::new(0x514763dc)));
66 let mut serializer = __serializer
67 .serialize_struct(
68 "hkbBoolVariableSequencedDataSample",
69 class_meta,
70 (8u64, 8u64),
71 )?;
72 serializer.serialize_field("time", &self.m_time)?;
73 serializer.serialize_field("value", &self.m_value)?;
74 serializer.pad_field([0u8; 3usize].as_slice(), [0u8; 3usize].as_slice())?;
75 serializer.end()
76 }
77 }
78};
79#[doc(hidden)]
80#[allow(non_upper_case_globals, unused_attributes, unused_qualifications)]
81const _: () = {
82 use havok_serde as _serde;
83 #[automatically_derived]
84 impl<'de> _serde::Deserialize<'de> for hkbBoolVariableSequencedDataSample {
85 fn deserialize<__D>(deserializer: __D) -> core::result::Result<Self, __D::Error>
86 where
87 __D: _serde::Deserializer<'de>,
88 {
89 #[allow(non_camel_case_types)]
90 enum __Field {
91 m_time,
92 m_value,
93 __ignore,
94 }
95 struct __FieldVisitor;
96 impl<'de> _serde::de::Visitor<'de> for __FieldVisitor {
97 type Value = __Field;
98 fn expecting(
99 &self,
100 __formatter: &mut core::fmt::Formatter,
101 ) -> core::fmt::Result {
102 core::fmt::Formatter::write_str(__formatter, "field identifier")
103 }
104 #[allow(clippy::match_single_binding)]
106 #[allow(clippy::reversed_empty_ranges)]
107 #[allow(clippy::single_match)]
108 fn visit_key<__E>(
109 self,
110 __value: &str,
111 ) -> core::result::Result<Self::Value, __E>
112 where
113 __E: _serde::de::Error,
114 {
115 match __value {
116 "time" => Ok(__Field::m_time),
117 "value" => Ok(__Field::m_value),
118 _ => Ok(__Field::__ignore),
119 }
120 }
121 }
122 impl<'de> _serde::Deserialize<'de> for __Field {
123 #[inline]
124 fn deserialize<__D>(
125 __deserializer: __D,
126 ) -> core::result::Result<Self, __D::Error>
127 where
128 __D: _serde::Deserializer<'de>,
129 {
130 _serde::Deserializer::deserialize_key(__deserializer, __FieldVisitor)
131 }
132 }
133 struct __hkbBoolVariableSequencedDataSampleVisitor<'de> {
134 marker: _serde::__private::PhantomData<
135 hkbBoolVariableSequencedDataSample,
136 >,
137 lifetime: _serde::__private::PhantomData<&'de ()>,
138 }
139 #[allow(clippy::match_single_binding)]
140 #[allow(clippy::reversed_empty_ranges)]
141 #[allow(clippy::single_match)]
142 impl<'de> _serde::de::Visitor<'de>
143 for __hkbBoolVariableSequencedDataSampleVisitor<'de> {
144 type Value = hkbBoolVariableSequencedDataSample;
145 fn expecting(
146 &self,
147 __formatter: &mut core::fmt::Formatter,
148 ) -> core::fmt::Result {
149 core::fmt::Formatter::write_str(
150 __formatter,
151 "struct hkbBoolVariableSequencedDataSample",
152 )
153 }
154 fn visit_struct_for_bytes<__A>(
155 self,
156 mut __map: __A,
157 ) -> _serde::__private::Result<Self::Value, __A::Error>
158 where
159 __A: _serde::de::MapAccess<'de>,
160 {
161 let __ptr = __A::class_ptr(&mut __map);
162 let mut m_time: _serde::__private::Option<f32> = _serde::__private::None;
163 let mut m_value: _serde::__private::Option<bool> = _serde::__private::None;
164 for i in 0..2usize {
165 match i {
166 0usize => {
167 if _serde::__private::Option::is_some(&m_time) {
168 return _serde::__private::Err(
169 <__A::Error as _serde::de::Error>::duplicate_field("time"),
170 );
171 }
172 m_time = _serde::__private::Some(
173 match __A::next_value::<f32>(&mut __map) {
174 _serde::__private::Ok(__val) => __val,
175 _serde::__private::Err(__err) => {
176 return _serde::__private::Err(__err);
177 }
178 },
179 );
180 }
181 1usize => {
182 if _serde::__private::Option::is_some(&m_value) {
183 return _serde::__private::Err(
184 <__A::Error as _serde::de::Error>::duplicate_field("value"),
185 );
186 }
187 m_value = _serde::__private::Some(
188 match __A::next_value::<bool>(&mut __map) {
189 _serde::__private::Ok(__val) => __val,
190 _serde::__private::Err(__err) => {
191 return _serde::__private::Err(__err);
192 }
193 },
194 );
195 }
196 _ => {}
197 }
198 }
199 __A::pad(&mut __map, 3usize, 3usize)?;
200 let m_time = match m_time {
201 _serde::__private::Some(__field) => __field,
202 _serde::__private::None => {
203 return _serde::__private::Err(
204 <__A::Error as _serde::de::Error>::missing_field("time"),
205 );
206 }
207 };
208 let m_value = match m_value {
209 _serde::__private::Some(__field) => __field,
210 _serde::__private::None => {
211 return _serde::__private::Err(
212 <__A::Error as _serde::de::Error>::missing_field("value"),
213 );
214 }
215 };
216 _serde::__private::Ok(hkbBoolVariableSequencedDataSample {
217 __ptr,
218 m_time,
219 m_value,
220 })
221 }
222 #[allow(clippy::manual_unwrap_or_default)]
223 fn visit_struct<__A>(
224 self,
225 mut __map: __A,
226 ) -> _serde::__private::Result<Self::Value, __A::Error>
227 where
228 __A: _serde::de::MapAccess<'de>,
229 {
230 let mut m_time: _serde::__private::Option<f32> = _serde::__private::None;
231 let mut m_value: _serde::__private::Option<bool> = _serde::__private::None;
232 while let _serde::__private::Some(__key) = {
233 __A::next_key::<__Field>(&mut __map)?
234 } {
235 match __key {
236 __Field::m_time => {
237 #[cfg(
238 any(feature = "strict", feature = "ignore_duplicates")
239 )]
240 if _serde::__private::Option::is_some(&m_time) {
241 #[cfg(feature = "ignore_duplicates")]
242 {
243 __A::skip_value(&mut __map)?;
244 continue;
245 }
246 #[cfg(feature = "strict")]
247 return _serde::__private::Err(
248 <__A::Error as _serde::de::Error>::duplicate_field("time"),
249 );
250 }
251 m_time = _serde::__private::Some(
252 match __A::next_value::<f32>(&mut __map) {
253 _serde::__private::Ok(__val) => __val,
254 _serde::__private::Err(__err) => {
255 return _serde::__private::Err(__err);
256 }
257 },
258 );
259 }
260 __Field::m_value => {
261 #[cfg(
262 any(feature = "strict", feature = "ignore_duplicates")
263 )]
264 if _serde::__private::Option::is_some(&m_value) {
265 #[cfg(feature = "ignore_duplicates")]
266 {
267 __A::skip_value(&mut __map)?;
268 continue;
269 }
270 #[cfg(feature = "strict")]
271 return _serde::__private::Err(
272 <__A::Error as _serde::de::Error>::duplicate_field("value"),
273 );
274 }
275 m_value = _serde::__private::Some(
276 match __A::next_value::<bool>(&mut __map) {
277 _serde::__private::Ok(__val) => __val,
278 _serde::__private::Err(__err) => {
279 return _serde::__private::Err(__err);
280 }
281 },
282 );
283 }
284 _ => __A::skip_value(&mut __map)?,
285 }
286 }
287 let m_time = match m_time {
288 _serde::__private::Some(__field) => __field,
289 _serde::__private::None => {
290 #[cfg(feature = "strict")]
291 return _serde::__private::Err(
292 <__A::Error as _serde::de::Error>::missing_field("time"),
293 );
294 #[cfg(not(feature = "strict"))] Default::default()
295 }
296 };
297 let m_value = match m_value {
298 _serde::__private::Some(__field) => __field,
299 _serde::__private::None => {
300 #[cfg(feature = "strict")]
301 return _serde::__private::Err(
302 <__A::Error as _serde::de::Error>::missing_field("value"),
303 );
304 #[cfg(not(feature = "strict"))] Default::default()
305 }
306 };
307 let __ptr = __A::class_ptr(&mut __map);
308 _serde::__private::Ok(hkbBoolVariableSequencedDataSample {
309 __ptr,
310 m_time,
311 m_value,
312 })
313 }
314 }
315 const FIELDS: &[&str] = &["time", "value"];
316 _serde::Deserializer::deserialize_struct(
317 deserializer,
318 "hkbBoolVariableSequencedDataSample",
319 FIELDS,
320 __hkbBoolVariableSequencedDataSampleVisitor {
321 marker: _serde::__private::PhantomData::<
322 hkbBoolVariableSequencedDataSample,
323 >,
324 lifetime: _serde::__private::PhantomData,
325 },
326 )
327 }
328 }
329};