havok_classes/generated/
hkPostFinishAttribute_.rs1use 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 hkPostFinishAttribute {
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 = "postFinishFunction"))]
32 #[cfg_attr(feature = "serde", serde(rename = "postFinishFunction"))]
33 pub m_postFinishFunction: Pointer,
34}
35const _: () = {
36 use havok_serde as _serde;
37 impl _serde::HavokClass for hkPostFinishAttribute {
38 #[inline]
39 fn name(&self) -> &'static str {
40 "hkPostFinishAttribute"
41 }
42 #[inline]
43 fn signature(&self) -> _serde::__private::Signature {
44 _serde::__private::Signature::new(0x903abb2c)
45 }
46 #[allow(clippy::let_and_return, clippy::vec_init_then_push)]
47 fn deps_indexes(&self) -> Vec<usize> {
48 let mut v = Vec::new();
49 v.push(self.m_postFinishFunction.get());
50 v
51 }
52 }
53 impl _serde::Serialize for hkPostFinishAttribute {
54 fn serialize<S>(&self, __serializer: S) -> Result<S::Ok, S::Error>
55 where
56 S: _serde::ser::Serializer,
57 {
58 let class_meta = self
59 .__ptr
60 .map(|name| (name, _serde::__private::Signature::new(0x903abb2c)));
61 let mut serializer = __serializer
62 .serialize_struct("hkPostFinishAttribute", class_meta, (4u64, 8u64))?;
63 serializer.skip_field("postFinishFunction", &self.m_postFinishFunction)?;
64 serializer.end()
65 }
66 }
67};
68#[doc(hidden)]
69#[allow(non_upper_case_globals, unused_attributes, unused_qualifications)]
70const _: () = {
71 use havok_serde as _serde;
72 #[automatically_derived]
73 impl<'de> _serde::Deserialize<'de> for hkPostFinishAttribute {
74 fn deserialize<__D>(deserializer: __D) -> core::result::Result<Self, __D::Error>
75 where
76 __D: _serde::Deserializer<'de>,
77 {
78 #[allow(non_camel_case_types)]
79 enum __Field {
80 __ignore,
81 }
82 struct __FieldVisitor;
83 impl<'de> _serde::de::Visitor<'de> for __FieldVisitor {
84 type Value = __Field;
85 fn expecting(
86 &self,
87 __formatter: &mut core::fmt::Formatter,
88 ) -> core::fmt::Result {
89 core::fmt::Formatter::write_str(__formatter, "field identifier")
90 }
91 #[allow(clippy::match_single_binding)]
93 #[allow(clippy::reversed_empty_ranges)]
94 #[allow(clippy::single_match)]
95 fn visit_key<__E>(
96 self,
97 __value: &str,
98 ) -> core::result::Result<Self::Value, __E>
99 where
100 __E: _serde::de::Error,
101 {
102 match __value {
103 _ => Ok(__Field::__ignore),
104 }
105 }
106 }
107 impl<'de> _serde::Deserialize<'de> for __Field {
108 #[inline]
109 fn deserialize<__D>(
110 __deserializer: __D,
111 ) -> core::result::Result<Self, __D::Error>
112 where
113 __D: _serde::Deserializer<'de>,
114 {
115 _serde::Deserializer::deserialize_key(__deserializer, __FieldVisitor)
116 }
117 }
118 struct __hkPostFinishAttributeVisitor<'de> {
119 marker: _serde::__private::PhantomData<hkPostFinishAttribute>,
120 lifetime: _serde::__private::PhantomData<&'de ()>,
121 }
122 #[allow(clippy::match_single_binding)]
123 #[allow(clippy::reversed_empty_ranges)]
124 #[allow(clippy::single_match)]
125 impl<'de> _serde::de::Visitor<'de> for __hkPostFinishAttributeVisitor<'de> {
126 type Value = hkPostFinishAttribute;
127 fn expecting(
128 &self,
129 __formatter: &mut core::fmt::Formatter,
130 ) -> core::fmt::Result {
131 core::fmt::Formatter::write_str(
132 __formatter,
133 "struct hkPostFinishAttribute",
134 )
135 }
136 fn visit_struct_for_bytes<__A>(
137 self,
138 mut __map: __A,
139 ) -> _serde::__private::Result<Self::Value, __A::Error>
140 where
141 __A: _serde::de::MapAccess<'de>,
142 {
143 let __ptr = __A::class_ptr(&mut __map);
144 let mut m_postFinishFunction: _serde::__private::Option<Pointer> = _serde::__private::None;
145 for i in 0..1usize {
146 match i {
147 0usize => {
148 if _serde::__private::Option::is_some(
149 &m_postFinishFunction,
150 ) {
151 return _serde::__private::Err(
152 <__A::Error as _serde::de::Error>::duplicate_field(
153 "postFinishFunction",
154 ),
155 );
156 }
157 m_postFinishFunction = _serde::__private::Some(
158 match __A::next_value::<Pointer>(&mut __map) {
159 _serde::__private::Ok(__val) => __val,
160 _serde::__private::Err(__err) => {
161 return _serde::__private::Err(__err);
162 }
163 },
164 );
165 }
166 _ => {}
167 }
168 }
169 let m_postFinishFunction = match m_postFinishFunction {
170 _serde::__private::Some(__field) => __field,
171 _serde::__private::None => {
172 return _serde::__private::Err(
173 <__A::Error as _serde::de::Error>::missing_field(
174 "postFinishFunction",
175 ),
176 );
177 }
178 };
179 _serde::__private::Ok(hkPostFinishAttribute {
180 __ptr,
181 m_postFinishFunction,
182 })
183 }
184 #[allow(clippy::manual_unwrap_or_default)]
185 fn visit_struct<__A>(
186 self,
187 mut __map: __A,
188 ) -> _serde::__private::Result<Self::Value, __A::Error>
189 where
190 __A: _serde::de::MapAccess<'de>,
191 {
192 while let _serde::__private::Some(__key) = {
193 __A::next_key::<__Field>(&mut __map)?
194 } {
195 match __key {
196 _ => __A::skip_value(&mut __map)?,
197 }
198 }
199 let __ptr = __A::class_ptr(&mut __map);
200 _serde::__private::Ok(hkPostFinishAttribute {
201 __ptr,
202 ..Default::default()
203 })
204 }
205 }
206 const FIELDS: &[&str] = &["postFinishFunction"];
207 _serde::Deserializer::deserialize_struct(
208 deserializer,
209 "hkPostFinishAttribute",
210 FIELDS,
211 __hkPostFinishAttributeVisitor {
212 marker: _serde::__private::PhantomData::<hkPostFinishAttribute>,
213 lifetime: _serde::__private::PhantomData,
214 },
215 )
216 }
217 }
218};