Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Merged by Bors] - bevy_reflect: Reflect enums #4761

Closed
wants to merge 75 commits into from
Closed
Show file tree
Hide file tree
Changes from 73 commits
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
a518351
Add the Enum trait to reflect enum types
Davier Jan 29, 2021
2f48a0f
Derive Reflect on enums
Davier Jan 30, 2021
a1adf36
Implement Reflect and Enum for Option
Davier Jan 30, 2021
11b16eb
refactoring
Davier Feb 1, 2021
80c3436
Fix wrappers using wrong ident
Davier Feb 23, 2021
c6bac64
Fix bevy path
MrGVSV May 14, 2022
e8c3ea9
Use Clone in apply for now
Davier Feb 23, 2021
a740c98
clippy
Davier Feb 23, 2021
8e3d717
Fix duplicated ident when using multiple struct or tuple variants
Davier Feb 25, 2021
aaf41e5
Remove whitespace from variant names
Davier Feb 25, 2021
6dd12d8
Start adding support for enums in ReflectDerive
MrGVSV May 14, 2022
637f961
Formatting
MrGVSV May 14, 2022
df715b1
Move enum_trait file to enums mod directory
MrGVSV May 14, 2022
f80e068
Added EnumInfo
MrGVSV May 14, 2022
6549c1c
Added VariantRef and VariantMut
MrGVSV May 14, 2022
7b0146a
Remove redundant trait bounds
MrGVSV May 14, 2022
65a8cf0
Updated Enum API with direct field access
MrGVSV May 14, 2022
88bf788
Re-enabled enum_partial_eq
MrGVSV May 14, 2022
875df20
Added clarifying comments to Enum methods
MrGVSV May 14, 2022
816989d
Privatize fields
MrGVSV May 14, 2022
5c34c0c
Privatize ReflectMeta fields
MrGVSV May 14, 2022
65231ca
Updated Option<T> Typed impl
MrGVSV May 14, 2022
8546bae
Added DynamicEnum
MrGVSV May 15, 2022
30aa279
Fix incorrect impl on Option<T>
MrGVSV May 15, 2022
f309064
Add derive macro logic for Enum
MrGVSV May 15, 2022
e3adb47
Add variant_path method
MrGVSV May 15, 2022
b71118c
Enforce proper field access for struct/tuple variants
MrGVSV May 15, 2022
7a32368
Add doc comment for Enum trait
MrGVSV May 15, 2022
3d54067
Fixed unit variants not returning VariantType
MrGVSV May 16, 2022
c1e5682
Fixed panic in Reflect::apply for derived enums
MrGVSV May 16, 2022
1ba467d
Refactor tests
MrGVSV May 16, 2022
32ec8b3
Added ability to ignore fields
MrGVSV May 16, 2022
84a2bab
Silence warning
MrGVSV May 16, 2022
6464f15
Cleanup
MrGVSV May 16, 2022
1360b5b
Added default hash function
MrGVSV May 16, 2022
4550e99
Genericized constructor
MrGVSV May 16, 2022
9939121
Use FromReflect to generate new variants
MrGVSV May 16, 2022
79a9a74
Split tests
MrGVSV May 16, 2022
dbd3d15
Generate FromReflect for enums
MrGVSV May 16, 2022
5d72170
Remove redundant tests
MrGVSV May 16, 2022
feb5ed4
Add VariantField
MrGVSV May 18, 2022
eb861a8
Remove unused imports
MrGVSV May 29, 2022
ef0ef4c
Fix some clippy errors
MrGVSV May 29, 2022
7035926
Fix unused variable warning on reflected enums
MrGVSV May 29, 2022
2d7dce1
Implement Reflect for WindowId
MrGVSV May 29, 2022
489e26d
Fix doc link
MrGVSV May 29, 2022
512e1a2
Add enum_debug helper
MrGVSV Jun 1, 2022
79ed4d8
Fix doc comment
MrGVSV Jun 1, 2022
4928c1c
Add debug impl to enum derive
MrGVSV Jun 1, 2022
812f93f
Create default Enum impls
MrGVSV Jun 1, 2022
dfbad2c
Fix clippy
MrGVSV Jun 1, 2022
1f18eaf
Fix more clippy
MrGVSV Jun 1, 2022
ba401b1
More clippy fixes
MrGVSV Jun 1, 2022
00f1339
Add enum serialization
MrGVSV Jun 4, 2022
dea4e0d
Fix unit variant partial_eq and added tests
MrGVSV Jun 4, 2022
9ae49e3
Add enum deserialization
MrGVSV Jun 4, 2022
9faa420
Cleanup
MrGVSV Jun 4, 2022
102a9bb
Revert "Create default Enum impls"
MrGVSV Jun 11, 2022
8b2163f
Fix up example
MrGVSV Jun 11, 2022
cf4f506
Formatting
MrGVSV Jun 11, 2022
1d9c646
Fix clippy
MrGVSV Jun 11, 2022
435fc45
Change blacklisted name
MrGVSV Jun 11, 2022
a8c184a
Fix serde tests
MrGVSV Jun 11, 2022
cd6c551
Remove redundant clone
MrGVSV Jun 11, 2022
ab3ea82
Use field access syntax in enum macros
nicopap Jun 23, 2022
080b039
Clenaup a bit more the bevy_reflect enum code
nicopap Jun 26, 2022
562fb43
Cleanup bevy_reflect a bit more
nicopap Jun 26, 2022
6d34b08
Fix DynamicEnum::apply for differing variants
MrGVSV Jun 27, 2022
604c36b
Fix clippy errors
MrGVSV Jun 27, 2022
777a618
Addressed PR comments
MrGVSV Jul 4, 2022
4b1bf21
Split up doc comments across lines
MrGVSV Jul 4, 2022
db777ac
Update crates/bevy_reflect/src/enums/enum_trait.rs
MrGVSV Jul 4, 2022
2160eee
Fixed doc link
MrGVSV Jul 4, 2022
2497ecd
Remove unnecessary allocations
cart Aug 2, 2022
5686686
Remove as_meta(), which adds redundant allocations
cart Aug 2, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ pub(crate) enum TraitImpl {
///
/// > __Note:__ Registering a custom function only works for special traits.
///
#[derive(Default)]
#[derive(Default, Clone)]
pub(crate) struct ReflectTraits {
debug: TraitImpl,
hash: TraitImpl,
Expand Down
Loading