@@ -5,160 +5,158 @@ use elementtree::{Element, QName};
55
66use std:: collections:: BTreeMap ;
77
8- #[ cfg( feature = "with-serde" ) ]
9- use serde:: Serialize ;
10-
118use crate :: error:: Unreal4Error ;
129
1310/// RuntimeProperties context element.
1411///
1512/// [Source](https://github.com/EpicGames/UnrealEngine/blob/b70f31f6645d764bcb55829228918a6e3b571e0b/Engine/Source/Runtime/Core/Private/GenericPlatform/GenericPlatformCrashContext.cpp#L274)
1613#[ derive( Clone , Debug , Default , PartialEq ) ]
17- #[ cfg_attr( feature = "with-serde" , derive( Serialize ) ) ]
14+ #[ cfg_attr( feature = "serde" , derive( serde_:: Serialize ) ) ]
15+ #[ cfg_attr( feature = "serde" , serde( crate = "serde_" ) ) ]
1816pub struct Unreal4ContextRuntimeProperties {
1917 /// CrashGUID
20- #[ cfg_attr( feature = "with- serde" , serde( skip_serializing_if = "Option::is_none" ) ) ]
18+ #[ cfg_attr( feature = "serde" , serde( skip_serializing_if = "Option::is_none" ) ) ]
2119 pub crash_guid : Option < String > ,
2220 /// ProcessId
23- #[ cfg_attr( feature = "with- serde" , serde( skip_serializing_if = "Option::is_none" ) ) ]
21+ #[ cfg_attr( feature = "serde" , serde( skip_serializing_if = "Option::is_none" ) ) ]
2422 pub process_id : Option < u32 > ,
2523 /// IsInternalBuild
26- #[ cfg_attr( feature = "with- serde" , serde( skip_serializing_if = "Option::is_none" ) ) ]
24+ #[ cfg_attr( feature = "serde" , serde( skip_serializing_if = "Option::is_none" ) ) ]
2725 pub is_internal_build : Option < bool > ,
2826 /// IsSourceDistribution
29- #[ cfg_attr( feature = "with- serde" , serde( skip_serializing_if = "Option::is_none" ) ) ]
27+ #[ cfg_attr( feature = "serde" , serde( skip_serializing_if = "Option::is_none" ) ) ]
3028 pub is_source_distribution : Option < bool > ,
3129 /// IsAssert
32- #[ cfg_attr( feature = "with- serde" , serde( skip_serializing_if = "Option::is_none" ) ) ]
30+ #[ cfg_attr( feature = "serde" , serde( skip_serializing_if = "Option::is_none" ) ) ]
3331 pub is_assert : Option < bool > ,
3432 /// IsEnsure
35- #[ cfg_attr( feature = "with- serde" , serde( skip_serializing_if = "Option::is_none" ) ) ]
33+ #[ cfg_attr( feature = "serde" , serde( skip_serializing_if = "Option::is_none" ) ) ]
3634 pub is_ensure : Option < bool > ,
3735 /// CrashType
38- #[ cfg_attr( feature = "with- serde" , serde( skip_serializing_if = "Option::is_none" ) ) ]
36+ #[ cfg_attr( feature = "serde" , serde( skip_serializing_if = "Option::is_none" ) ) ]
3937 pub crash_type : Option < String > ,
4038 /// SecondsSinceStart
41- #[ cfg_attr( feature = "with- serde" , serde( skip_serializing_if = "Option::is_none" ) ) ]
39+ #[ cfg_attr( feature = "serde" , serde( skip_serializing_if = "Option::is_none" ) ) ]
4240 pub seconds_since_start : Option < u32 > ,
4341 /// GameName
44- #[ cfg_attr( feature = "with- serde" , serde( skip_serializing_if = "Option::is_none" ) ) ]
42+ #[ cfg_attr( feature = "serde" , serde( skip_serializing_if = "Option::is_none" ) ) ]
4543 pub game_name : Option < String > ,
4644 /// ExecutableName
47- #[ cfg_attr( feature = "with- serde" , serde( skip_serializing_if = "Option::is_none" ) ) ]
45+ #[ cfg_attr( feature = "serde" , serde( skip_serializing_if = "Option::is_none" ) ) ]
4846 pub executable_name : Option < String > ,
4947 /// BuildConfiguration
50- #[ cfg_attr( feature = "with- serde" , serde( skip_serializing_if = "Option::is_none" ) ) ]
48+ #[ cfg_attr( feature = "serde" , serde( skip_serializing_if = "Option::is_none" ) ) ]
5149 pub build_configuration : Option < String > ,
5250 /// PlatformName
53- #[ cfg_attr( feature = "with- serde" , serde( skip_serializing_if = "Option::is_none" ) ) ]
51+ #[ cfg_attr( feature = "serde" , serde( skip_serializing_if = "Option::is_none" ) ) ]
5452 pub platform_name : Option < String > ,
5553 /// EngineMode
56- #[ cfg_attr( feature = "with- serde" , serde( skip_serializing_if = "Option::is_none" ) ) ]
54+ #[ cfg_attr( feature = "serde" , serde( skip_serializing_if = "Option::is_none" ) ) ]
5755 pub engine_mode : Option < String > ,
5856 /// EngineVersion
59- #[ cfg_attr( feature = "with- serde" , serde( skip_serializing_if = "Option::is_none" ) ) ]
57+ #[ cfg_attr( feature = "serde" , serde( skip_serializing_if = "Option::is_none" ) ) ]
6058 pub engine_version : Option < String > ,
6159 /// LanguageLCID
62- #[ cfg_attr( feature = "with- serde" , serde( skip_serializing_if = "Option::is_none" ) ) ]
60+ #[ cfg_attr( feature = "serde" , serde( skip_serializing_if = "Option::is_none" ) ) ]
6361 pub language_lcid : Option < i32 > ,
6462 /// AppDefaultLocale
65- #[ cfg_attr( feature = "with- serde" , serde( skip_serializing_if = "Option::is_none" ) ) ]
63+ #[ cfg_attr( feature = "serde" , serde( skip_serializing_if = "Option::is_none" ) ) ]
6664 pub app_default_locate : Option < String > ,
6765 /// BuildVersion
68- #[ cfg_attr( feature = "with- serde" , serde( skip_serializing_if = "Option::is_none" ) ) ]
66+ #[ cfg_attr( feature = "serde" , serde( skip_serializing_if = "Option::is_none" ) ) ]
6967 pub build_version : Option < String > ,
7068 /// IsUE4Release
71- #[ cfg_attr( feature = "with- serde" , serde( skip_serializing_if = "Option::is_none" ) ) ]
69+ #[ cfg_attr( feature = "serde" , serde( skip_serializing_if = "Option::is_none" ) ) ]
7270 pub is_ue4_release : Option < bool > ,
7371 /// UserName
74- #[ cfg_attr( feature = "with- serde" , serde( skip_serializing_if = "Option::is_none" ) ) ]
72+ #[ cfg_attr( feature = "serde" , serde( skip_serializing_if = "Option::is_none" ) ) ]
7573 pub username : Option < String > ,
7674 /// BaseDir
77- #[ cfg_attr( feature = "with- serde" , serde( skip_serializing_if = "Option::is_none" ) ) ]
75+ #[ cfg_attr( feature = "serde" , serde( skip_serializing_if = "Option::is_none" ) ) ]
7876 pub base_dir : Option < String > ,
7977 /// RootDir
80- #[ cfg_attr( feature = "with- serde" , serde( skip_serializing_if = "Option::is_none" ) ) ]
78+ #[ cfg_attr( feature = "serde" , serde( skip_serializing_if = "Option::is_none" ) ) ]
8179 pub root_dir : Option < String > ,
8280 /// MachineId
83- #[ cfg_attr( feature = "with- serde" , serde( skip_serializing_if = "Option::is_none" ) ) ]
81+ #[ cfg_attr( feature = "serde" , serde( skip_serializing_if = "Option::is_none" ) ) ]
8482 pub machine_id : Option < String > ,
8583 /// LoginId
86- #[ cfg_attr( feature = "with- serde" , serde( skip_serializing_if = "Option::is_none" ) ) ]
84+ #[ cfg_attr( feature = "serde" , serde( skip_serializing_if = "Option::is_none" ) ) ]
8785 pub login_id : Option < String > ,
8886 /// EpicAccountId
89- #[ cfg_attr( feature = "with- serde" , serde( skip_serializing_if = "Option::is_none" ) ) ]
87+ #[ cfg_attr( feature = "serde" , serde( skip_serializing_if = "Option::is_none" ) ) ]
9088 pub epic_account_id : Option < String > ,
9189 /// CallStack
9290 /// [Source](https://github.com/EpicGames/UnrealEngine/blob/b70f31f6645d764bcb55829228918a6e3b571e0b/Engine/Source/Runtime/Core/Private/GenericPlatform/GenericPlatformCrashContext.cpp#L326-L327)
93- #[ cfg_attr( feature = "with- serde" , serde( skip_serializing_if = "Option::is_none" ) ) ]
91+ #[ cfg_attr( feature = "serde" , serde( skip_serializing_if = "Option::is_none" ) ) ]
9492 pub legacy_call_stack : Option < String > ,
9593 /// PCallStack
9694 // [Sopurce](https://github.com/EpicGames/UnrealEngine/blob/b70f31f6645d764bcb55829228918a6e3b571e0b/Engine/Source/Runtime/Core/Private/GenericPlatform/GenericPlatformCrashContext.cpp#L329-L330)
97- #[ cfg_attr( feature = "with- serde" , serde( skip_serializing_if = "Option::is_none" ) ) ]
95+ #[ cfg_attr( feature = "serde" , serde( skip_serializing_if = "Option::is_none" ) ) ]
9896 pub portable_call_stack : Option < String > ,
9997 /// UserDescription
100- #[ cfg_attr( feature = "with- serde" , serde( skip_serializing_if = "Option::is_none" ) ) ]
98+ #[ cfg_attr( feature = "serde" , serde( skip_serializing_if = "Option::is_none" ) ) ]
10199 pub user_description : Option < String > ,
102100 /// ErrorMessage
103- #[ cfg_attr( feature = "with- serde" , serde( skip_serializing_if = "Option::is_none" ) ) ]
101+ #[ cfg_attr( feature = "serde" , serde( skip_serializing_if = "Option::is_none" ) ) ]
104102 pub error_message : Option < String > ,
105103 /// CrashReporterMessage
106- #[ cfg_attr( feature = "with- serde" , serde( skip_serializing_if = "Option::is_none" ) ) ]
104+ #[ cfg_attr( feature = "serde" , serde( skip_serializing_if = "Option::is_none" ) ) ]
107105 pub crash_reporter_message : Option < String > ,
108106 /// Misc.NumberOfCores
109- #[ cfg_attr( feature = "with- serde" , serde( skip_serializing_if = "Option::is_none" ) ) ]
107+ #[ cfg_attr( feature = "serde" , serde( skip_serializing_if = "Option::is_none" ) ) ]
110108 pub misc_number_of_cores : Option < u32 > ,
111109 /// Misc.NumberOfCoresIncludingHyperthreads
112- #[ cfg_attr( feature = "with- serde" , serde( skip_serializing_if = "Option::is_none" ) ) ]
110+ #[ cfg_attr( feature = "serde" , serde( skip_serializing_if = "Option::is_none" ) ) ]
113111 pub misc_number_of_cores_inc_hyperthread : Option < u32 > ,
114112 /// Misc.Is64bitOperatingSystem
115- #[ cfg_attr( feature = "with- serde" , serde( skip_serializing_if = "Option::is_none" ) ) ]
113+ #[ cfg_attr( feature = "serde" , serde( skip_serializing_if = "Option::is_none" ) ) ]
116114 pub misc_is_64bit : Option < bool > ,
117115 /// Misc.CPUVendor
118- #[ cfg_attr( feature = "with- serde" , serde( skip_serializing_if = "Option::is_none" ) ) ]
116+ #[ cfg_attr( feature = "serde" , serde( skip_serializing_if = "Option::is_none" ) ) ]
119117 pub misc_cpu_vendor : Option < String > ,
120118 /// Misc.CPUBrand
121- #[ cfg_attr( feature = "with- serde" , serde( skip_serializing_if = "Option::is_none" ) ) ]
119+ #[ cfg_attr( feature = "serde" , serde( skip_serializing_if = "Option::is_none" ) ) ]
122120 pub misc_cpu_brand : Option < String > ,
123121 #[ doc( hidden) ]
124122 #[ deprecated( note = "use misc_primary_gpu_brand instead" ) ]
125- #[ cfg_attr( feature = "with- serde" , serde( skip_serializing_if = "Option::is_none" ) ) ]
123+ #[ cfg_attr( feature = "serde" , serde( skip_serializing_if = "Option::is_none" ) ) ]
126124 pub misc_primary_cpu_brand : Option < String > ,
127125 /// Misc.PrimaryGPUBrand
128- #[ cfg_attr( feature = "with- serde" , serde( skip_serializing_if = "Option::is_none" ) ) ]
126+ #[ cfg_attr( feature = "serde" , serde( skip_serializing_if = "Option::is_none" ) ) ]
129127 pub misc_primary_gpu_brand : Option < String > ,
130128 /// Misc.OSVersionMajor
131- #[ cfg_attr( feature = "with- serde" , serde( skip_serializing_if = "Option::is_none" ) ) ]
129+ #[ cfg_attr( feature = "serde" , serde( skip_serializing_if = "Option::is_none" ) ) ]
132130 pub misc_os_version_major : Option < String > ,
133131 /// Misc.OSVersionMinor
134- #[ cfg_attr( feature = "with- serde" , serde( skip_serializing_if = "Option::is_none" ) ) ]
132+ #[ cfg_attr( feature = "serde" , serde( skip_serializing_if = "Option::is_none" ) ) ]
135133 pub misc_os_version_minor : Option < String > ,
136134 /// GameStateName
137- #[ cfg_attr( feature = "with- serde" , serde( skip_serializing_if = "Option::is_none" ) ) ]
135+ #[ cfg_attr( feature = "serde" , serde( skip_serializing_if = "Option::is_none" ) ) ]
138136 pub game_state_name : Option < String > ,
139137 /// MemoryStats.TotalPhysical
140- #[ cfg_attr( feature = "with- serde" , serde( skip_serializing_if = "Option::is_none" ) ) ]
138+ #[ cfg_attr( feature = "serde" , serde( skip_serializing_if = "Option::is_none" ) ) ]
141139 pub memory_stats_total_physical : Option < u64 > ,
142140 /// MemoryStats.TotalVirtual
143- #[ cfg_attr( feature = "with- serde" , serde( skip_serializing_if = "Option::is_none" ) ) ]
141+ #[ cfg_attr( feature = "serde" , serde( skip_serializing_if = "Option::is_none" ) ) ]
144142 pub memory_stats_total_virtual : Option < u64 > ,
145143 /// MemoryStats.PageSize
146- #[ cfg_attr( feature = "with- serde" , serde( skip_serializing_if = "Option::is_none" ) ) ]
144+ #[ cfg_attr( feature = "serde" , serde( skip_serializing_if = "Option::is_none" ) ) ]
147145 pub memory_stats_page_size : Option < u64 > ,
148146 /// MemoryStats.TotalPhysicalGB
149- #[ cfg_attr( feature = "with- serde" , serde( skip_serializing_if = "Option::is_none" ) ) ]
147+ #[ cfg_attr( feature = "serde" , serde( skip_serializing_if = "Option::is_none" ) ) ]
150148 pub memory_stats_total_phsysical_gb : Option < u32 > ,
151149 /// TimeOfCrash
152- #[ cfg_attr( feature = "with- serde" , serde( skip_serializing_if = "Option::is_none" ) ) ]
150+ #[ cfg_attr( feature = "serde" , serde( skip_serializing_if = "Option::is_none" ) ) ]
153151 pub time_of_crash : Option < u64 > ,
154152 /// bAllowToBeContacted
155- #[ cfg_attr( feature = "with- serde" , serde( skip_serializing_if = "Option::is_none" ) ) ]
153+ #[ cfg_attr( feature = "serde" , serde( skip_serializing_if = "Option::is_none" ) ) ]
156154 pub allowed_to_be_contacted : Option < bool > ,
157155 /// CrashReportClientVersion
158- #[ cfg_attr( feature = "with- serde" , serde( skip_serializing_if = "Option::is_none" ) ) ]
156+ #[ cfg_attr( feature = "serde" , serde( skip_serializing_if = "Option::is_none" ) ) ]
159157 pub crash_reporter_client_version : Option < String > ,
160158 /// Modules
161- #[ cfg_attr( feature = "with- serde" , serde( skip_serializing_if = "Option::is_none" ) ) ]
159+ #[ cfg_attr( feature = "serde" , serde( skip_serializing_if = "Option::is_none" ) ) ]
162160 pub modules : Option < String > ,
163161 /// Custom attributes
164162 pub custom : BTreeMap < String , String > ,
@@ -277,7 +275,8 @@ impl Unreal4ContextRuntimeProperties {
277275/// [Source[(https://github.com/EpicGames/UnrealEngine/blob/b70f31f6645d764bcb55829228918a6e3b571e0b/Engine/Source/Runtime/Core/Private/GenericPlatform/GenericPlatformCrashContext.cpp#L451-L455)
278276/// [Windows](https://github.com/EpicGames/UnrealEngine/blob/b70f31f6645d764bcb55829228918a6e3b571e0b/Engine/Source/Runtime/Core/Private/Windows/WindowsPlatformCrashContext.cpp#L39-L44)
279277#[ derive( Clone , Debug , Default , PartialEq ) ]
280- #[ cfg_attr( feature = "with-serde" , derive( Serialize ) ) ]
278+ #[ cfg_attr( feature = "serde" , derive( serde_:: Serialize ) ) ]
279+ #[ cfg_attr( feature = "serde" , serde( crate = "serde_" ) ) ]
281280pub struct Unreal4ContextPlatformProperties {
282281 /// Whether the crash happened on a Windows device.
283282 pub is_windows : Option < bool > ,
@@ -317,26 +316,27 @@ impl Unreal4ContextPlatformProperties {
317316///
318317/// [Source](https://github.com/EpicGames/UnrealEngine/blob/b70f31f6645d764bcb55829228918a6e3b571e0b/Engine/Source/Runtime/Core/Private/GenericPlatform/GenericPlatformCrashContext.cpp)
319318#[ derive( Clone , Debug , Default , PartialEq ) ]
320- #[ cfg_attr( feature = "with-serde" , derive( Serialize ) ) ]
319+ #[ cfg_attr( feature = "serde" , derive( serde_:: Serialize ) ) ]
320+ #[ cfg_attr( feature = "serde" , serde( crate = "serde_" ) ) ]
321321pub struct Unreal4Context {
322322 /// RuntimeProperties context element.
323- #[ cfg_attr( feature = "with- serde" , serde( skip_serializing_if = "Option::is_none" ) ) ]
323+ #[ cfg_attr( feature = "serde" , serde( skip_serializing_if = "Option::is_none" ) ) ]
324324 pub runtime_properties : Option < Unreal4ContextRuntimeProperties > ,
325325
326326 /// Platform specific properties.
327- #[ cfg_attr( feature = "with- serde" , serde( skip_serializing_if = "Option::is_none" ) ) ]
327+ #[ cfg_attr( feature = "serde" , serde( skip_serializing_if = "Option::is_none" ) ) ]
328328 pub platform_properties : Option < Unreal4ContextPlatformProperties > ,
329329
330330 /// Engine data.
331331 #[ cfg_attr(
332- feature = "with- serde" ,
332+ feature = "serde" ,
333333 serde( default , skip_serializing_if = "BTreeMap::is_empty" )
334334 ) ]
335335 pub engine_data : BTreeMap < String , String > ,
336336
337337 /// Game data.
338338 #[ cfg_attr(
339- feature = "with- serde" ,
339+ feature = "serde" ,
340340 serde( default , skip_serializing_if = "BTreeMap::is_empty" )
341341 ) ]
342342 pub game_data : BTreeMap < String , String > ,
0 commit comments