mirror of
https://github.com/bevyengine/bevy
synced 2024-11-22 20:53:53 +00:00
Implemented Reflect
for all the ranges (#5806)
# Objective Fixes #5763 ## Solution Implemented as reflect value like the current `Range`. Is there a benefit to changing everything to a reflect struct?
This commit is contained in:
parent
df31b7d762
commit
e9661bea1a
1 changed files with 11 additions and 1 deletions
|
@ -18,7 +18,7 @@ use std::{
|
|||
NonZeroI128, NonZeroI16, NonZeroI32, NonZeroI64, NonZeroI8, NonZeroIsize, NonZeroU128,
|
||||
NonZeroU16, NonZeroU32, NonZeroU64, NonZeroU8, NonZeroUsize,
|
||||
},
|
||||
ops::Range,
|
||||
ops::{Range, RangeFrom, RangeFull, RangeInclusive, RangeTo, RangeToInclusive},
|
||||
};
|
||||
|
||||
impl_reflect_value!(bool(Debug, Hash, PartialEq, Serialize, Deserialize));
|
||||
|
@ -41,6 +41,11 @@ impl_reflect_value!(String(Debug, Hash, PartialEq, Serialize, Deserialize));
|
|||
impl_reflect_value!(Result<T: Clone + Reflect + 'static, E: Clone + Reflect + 'static>());
|
||||
impl_reflect_value!(HashSet<T: Hash + Eq + Clone + Send + Sync + 'static>());
|
||||
impl_reflect_value!(Range<T: Clone + Send + Sync + 'static>());
|
||||
impl_reflect_value!(RangeInclusive<T: Clone + Send + Sync + 'static>());
|
||||
impl_reflect_value!(RangeFrom<T: Clone + Send + Sync + 'static>());
|
||||
impl_reflect_value!(RangeTo<T: Clone + Send + Sync + 'static>());
|
||||
impl_reflect_value!(RangeToInclusive<T: Clone + Send + Sync + 'static>());
|
||||
impl_reflect_value!(RangeFull());
|
||||
impl_reflect_value!(Duration(Debug, Hash, PartialEq, Serialize, Deserialize));
|
||||
impl_reflect_value!(Instant(Debug, Hash, PartialEq));
|
||||
impl_reflect_value!(NonZeroI128(Debug, Hash, PartialEq, Serialize, Deserialize));
|
||||
|
@ -75,6 +80,11 @@ impl_from_reflect_value!(f64);
|
|||
impl_from_reflect_value!(String);
|
||||
impl_from_reflect_value!(HashSet<T: Hash + Eq + Clone + Send + Sync + 'static>);
|
||||
impl_from_reflect_value!(Range<T: Clone + Send + Sync + 'static>);
|
||||
impl_from_reflect_value!(RangeInclusive<T: Clone + Send + Sync + 'static>);
|
||||
impl_from_reflect_value!(RangeFrom<T: Clone + Send + Sync + 'static>);
|
||||
impl_from_reflect_value!(RangeTo<T: Clone + Send + Sync + 'static>);
|
||||
impl_from_reflect_value!(RangeToInclusive<T: Clone + Send + Sync + 'static>);
|
||||
impl_from_reflect_value!(RangeFull);
|
||||
impl_from_reflect_value!(Duration);
|
||||
impl_from_reflect_value!(Instant);
|
||||
impl_from_reflect_value!(NonZeroI128);
|
||||
|
|
Loading…
Reference in a new issue