Skip to main content

PartialReflect

Trait PartialReflect 

Source
pub trait PartialReflect:
    DynamicTypePath
    + Send
    + Sync
    + 'static {
Show 21 methods // Required methods fn get_represented_type_info(&self) -> Option<&'static TypeInfo>; fn into_partial_reflect(self: Box<Self>) -> Box<dyn PartialReflect>; fn as_partial_reflect(&self) -> &(dyn PartialReflect + 'static); fn as_partial_reflect_mut(&mut self) -> &mut (dyn PartialReflect + 'static); fn try_into_reflect( self: Box<Self>, ) -> Result<Box<dyn Reflect>, Box<dyn PartialReflect>>; fn try_as_reflect(&self) -> Option<&(dyn Reflect + 'static)>; fn try_as_reflect_mut(&mut self) -> Option<&mut (dyn Reflect + 'static)>; fn try_apply( &mut self, value: &(dyn PartialReflect + 'static), ) -> Result<(), ApplyError>; fn reflect_ref(&self) -> ReflectRef<'_>; fn reflect_mut(&mut self) -> ReflectMut<'_>; fn reflect_owned(self: Box<Self>) -> ReflectOwned; // Provided methods fn apply(&mut self, value: &(dyn PartialReflect + 'static)) { ... } fn reflect_kind(&self) -> ReflectKind { ... } fn to_dynamic(&self) -> Box<dyn PartialReflect> { ... } fn reflect_clone(&self) -> Result<Box<dyn Reflect>, ReflectCloneError> { ... } fn reflect_clone_and_take<T>(&self) -> Result<T, ReflectCloneError> where T: 'static, Self: Sized + TypePath { ... } fn reflect_hash(&self) -> Option<u64> { ... } fn reflect_partial_eq( &self, _value: &(dyn PartialReflect + 'static), ) -> Option<bool> { ... } fn reflect_partial_cmp( &self, _value: &(dyn PartialReflect + 'static), ) -> Option<Ordering> { ... } fn debug(&self, f: &mut Formatter<'_>) -> Result<(), Error> { ... } fn is_dynamic(&self) -> bool { ... }
}
Expand description

The foundational trait of bevy_reflect, used for accessing and modifying data dynamically.

This is a supertrait of Reflect, meaning any type which implements Reflect implements PartialReflect by definition.

It’s recommended to use the derive macro for Reflect rather than manually implementing this trait. Doing so will automatically implement this trait as well as many other useful traits for reflection, including one of the appropriate subtraits: Struct, TupleStruct or Enum.

See the crate-level documentation to see how this trait and its subtraits can be used.

Required Methods§

Source

fn get_represented_type_info(&self) -> Option<&'static TypeInfo>

Returns the TypeInfo of the type represented by this value.

For most types, this will simply return their own TypeInfo. However, for dynamic types, such as DynamicStruct or DynamicList, this will return the type they represent (or None if they don’t represent any particular type).

This method is great if you have an instance of a type or a dyn Reflect, and want to access its TypeInfo. However, if this method is to be called frequently, consider using TypeRegistry::get_type_info as it can be more performant for such use cases.

Source

fn into_partial_reflect(self: Box<Self>) -> Box<dyn PartialReflect>

Casts this type to a boxed, reflected value.

This is useful for coercing trait objects.

Source

fn as_partial_reflect(&self) -> &(dyn PartialReflect + 'static)

Casts this type to a reflected value.

This is useful for coercing trait objects.

Source

fn as_partial_reflect_mut(&mut self) -> &mut (dyn PartialReflect + 'static)

Casts this type to a mutable, reflected value.

This is useful for coercing trait objects.

Source

fn try_into_reflect( self: Box<Self>, ) -> Result<Box<dyn Reflect>, Box<dyn PartialReflect>>

Attempts to cast this type to a boxed, fully-reflected value.

Source

fn try_as_reflect(&self) -> Option<&(dyn Reflect + 'static)>

Attempts to cast this type to a fully-reflected value.

Source

fn try_as_reflect_mut(&mut self) -> Option<&mut (dyn Reflect + 'static)>

Attempts to cast this type to a mutable, fully-reflected value.

Source

fn try_apply( &mut self, value: &(dyn PartialReflect + 'static), ) -> Result<(), ApplyError>

Tries to apply a reflected value to this value.

Functions the same as the apply function but returns an error instead of panicking.

§Handling Errors

This function may leave self in a partially mutated state if a error was encountered on the way. consider maintaining a cloned instance of this data you can switch to if a error is encountered.

Source

fn reflect_ref(&self) -> ReflectRef<'_>

Returns an immutable enumeration of “kinds” of type.

See ReflectRef.

Source

fn reflect_mut(&mut self) -> ReflectMut<'_>

Returns a mutable enumeration of “kinds” of type.

See ReflectMut.

Source

fn reflect_owned(self: Box<Self>) -> ReflectOwned

Returns an owned enumeration of “kinds” of type.

See ReflectOwned.

Provided Methods§

Source

fn apply(&mut self, value: &(dyn PartialReflect + 'static))

Applies a reflected value to this value.

If Self implements a reflection subtrait, then the semantics of this method are as follows:

  • If Self is a Struct, then the value of each named field of value is applied to the corresponding named field of self. Fields which are not present in both structs are ignored.
  • If Self is a TupleStruct or Tuple, then the value of each numbered field is applied to the corresponding numbered field of self. Fields which are not present in both values are ignored.
  • If Self is an Enum, then the variant of self is updated to match the variant of value. The corresponding fields of that variant are applied from value onto self. Fields which are not present in both values are ignored.
  • If Self is a List or Array, then each element of value is applied to the corresponding element of self. Up to self.len() items are applied, and excess elements in value are appended to self.
  • If Self is a Map, then for each key in value, the associated value is applied to the value associated with the same key in self. Keys which are not present in self are inserted, and keys from self which are not present in value are removed.
  • If Self is a Set, then each element of value is applied to the corresponding element of Self. If an element of value does not exist in Self then it is cloned and inserted. If an element from self is not present in value then it is removed.
  • If Self is none of these, then value is downcast to Self, cloned, and assigned to self.

Note that Reflect must be implemented manually for Lists, Maps, and Sets in order to achieve the correct semantics, as derived implementations will have the semantics for Struct, TupleStruct, Enum or none of the above depending on the kind of type. For lists, maps, and sets, use the list_apply, map_apply, and set_apply helper functions when implementing this method.

§Panics

Derived implementations of this method will panic:

  • If the type of value is not of the same kind as Self (e.g. if Self is a List, while value is a Struct).
  • If Self is any complex type and the corresponding fields or elements of self and value are not of the same type.
  • If Self is an opaque type and value cannot be downcast to Self
Examples found in repository?
examples/reflection/reflection.rs (line 87)
55fn setup(type_registry: Res<AppTypeRegistry>) {
56    let mut value = Foo {
57        a: 1,
58        _ignored: NonReflectedValue { _a: 10 },
59        nested: Bar { b: 8 },
60    };
61
62    // You can set field values like this. The type must match exactly or this will fail.
63    *value.get_field_mut("a").unwrap() = 2usize;
64    assert_eq!(value.a, 2);
65    assert_eq!(*value.get_field::<usize>("a").unwrap(), 2);
66
67    // You can also get the `&dyn PartialReflect` value of a field like this
68    let field = value.field("a").unwrap();
69
70    // But values introspected via `PartialReflect` will not return `dyn Reflect` trait objects
71    // (even if the containing type does implement `Reflect`), so we need to convert them:
72    let fully_reflected_field = field.try_as_reflect().unwrap();
73
74    // Now, you can downcast your `Reflect` value like this:
75    assert_eq!(*fully_reflected_field.downcast_ref::<usize>().unwrap(), 2);
76
77    // For this specific case, we also support the shortcut `try_downcast_ref`:
78    assert_eq!(*field.try_downcast_ref::<usize>().unwrap(), 2);
79
80    // `DynamicStruct` also implements the `Struct` and `Reflect` traits.
81    let mut patch = DynamicStruct::default();
82    patch.insert("a", 4usize);
83
84    // You can "apply" Reflect implementations on top of other Reflect implementations.
85    // This will only set fields with the same name, and it will fail if the types don't match.
86    // You can use this to "patch" your types with new values.
87    value.apply(&patch);
88    assert_eq!(value.a, 4);
89
90    let type_registry = type_registry.read();
91    // By default, all derived `Reflect` types can be Serialized using serde. No need to derive
92    // Serialize!
93    let serializer = ReflectSerializer::new(&value, &type_registry);
94    let ron_string =
95        ron::ser::to_string_pretty(&serializer, ron::ser::PrettyConfig::default()).unwrap();
96    info!("{}\n", ron_string);
97
98    // Dynamic properties can be deserialized
99    let reflect_deserializer = ReflectDeserializer::new(&type_registry);
100    let mut deserializer = ron::de::Deserializer::from_str(&ron_string).unwrap();
101    let reflect_value = reflect_deserializer.deserialize(&mut deserializer).unwrap();
102
103    // Deserializing returns a `Box<dyn PartialReflect>` value.
104    // Generally, deserializing a value will return the "dynamic" variant of a type.
105    // For example, deserializing a struct will return the DynamicStruct type.
106    // "Opaque types" will be deserialized as themselves.
107    assert_eq!(
108        reflect_value.reflect_type_path(),
109        DynamicStruct::type_path(),
110    );
111
112    // Reflect has its own `partial_eq` implementation, named `reflect_partial_eq`. This behaves
113    // like normal `partial_eq`, but it treats "dynamic" and "non-dynamic" types the same. The
114    // `Foo` struct and deserialized `DynamicStruct` are considered equal for this reason:
115    assert!(reflect_value.reflect_partial_eq(&value).unwrap());
116
117    // By "patching" `Foo` with the deserialized DynamicStruct, we can "Deserialize" Foo.
118    // This means we can serialize and deserialize with a single `Reflect` derive!
119    value.apply(&*reflect_value);
120}
More examples
Hide additional examples
examples/reflection/reflection_types.rs (line 141)
67fn setup() {
68    let mut z = <HashMap<_, _>>::default();
69    z.insert("Hello".to_string(), 1.0);
70    let value: Box<dyn Reflect> = Box::new(A {
71        x: 1,
72        y: vec![1, 2],
73        z,
74    });
75
76    // There are a number of different "reflect traits", which each expose different operations on
77    // the underlying type
78    match value.reflect_ref() {
79        // `Struct` is a trait automatically implemented for structs that derive Reflect. This trait
80        // allows you to interact with fields via their string names or indices
81        ReflectRef::Struct(value) => {
82            info!(
83                "This is a 'struct' type with an 'x' value of {}",
84                value.get_field::<usize>("x").unwrap()
85            );
86        }
87        // `TupleStruct` is a trait automatically implemented for tuple structs that derive Reflect.
88        // This trait allows you to interact with fields via their indices
89        ReflectRef::TupleStruct(_) => {}
90        // `Tuple` is a special trait that can be manually implemented (instead of deriving
91        // Reflect). This exposes "tuple" operations on your type, allowing you to interact
92        // with fields via their indices. Tuple is automatically implemented for tuples of
93        // arity 12 or less.
94        ReflectRef::Tuple(_) => {}
95        // `Enum` is a trait automatically implemented for enums that derive Reflect. This trait allows you
96        // to interact with the current variant and its fields (if it has any)
97        ReflectRef::Enum(_) => {}
98        // `List` is a special trait that can be manually implemented (instead of deriving Reflect).
99        // This exposes "list" operations on your type, such as insertion. `List` is automatically
100        // implemented for relevant core types like Vec<T>.
101        ReflectRef::List(_) => {}
102        // `Array` is a special trait that can be manually implemented (instead of deriving Reflect).
103        // This exposes "array" operations on your type, such as indexing. `Array`
104        // is automatically implemented for relevant core types like [T; N].
105        ReflectRef::Array(_) => {}
106        // `Map` is a special trait that can be manually implemented (instead of deriving Reflect).
107        // This exposes "map" operations on your type, such as getting / inserting by key.
108        // Map is automatically implemented for relevant core types like HashMap<K, V>
109        ReflectRef::Map(_) => {}
110        // `Set` is a special trait that can be manually implemented (instead of deriving Reflect).
111        // This exposes "set" operations on your type, such as getting / inserting by value.
112        // Set is automatically implemented for relevant core types like HashSet<T>
113        ReflectRef::Set(_) => {}
114        // `Function` is a special trait that can be manually implemented (instead of deriving Reflect).
115        // This exposes "function" operations on your type, such as calling it with arguments.
116        // This trait is automatically implemented for types like DynamicFunction.
117        // This variant only exists if the `reflect_functions` feature is enabled.
118        #[cfg(feature = "reflect_functions")]
119        ReflectRef::Function(_) => {}
120        // `Opaque` types do not implement any of the other traits above. They are simply a Reflect
121        // implementation. Opaque is implemented for opaque types like String and Instant,
122        // but also include primitive types like i32, usize, and f32 (despite not technically being opaque).
123        ReflectRef::Opaque(_) => {}
124        #[expect(
125            clippy::allow_attributes,
126            reason = "`unreachable_patterns` is not always linted"
127        )]
128        #[allow(
129            unreachable_patterns,
130            reason = "This example cannot always detect when `bevy_reflect/functions` is enabled."
131        )]
132        _ => {}
133    }
134
135    let mut dynamic_list = DynamicList::default();
136    dynamic_list.push(3u32);
137    dynamic_list.push(4u32);
138    dynamic_list.push(5u32);
139
140    let mut value: A = value.take::<A>().unwrap();
141    value.y.apply(&dynamic_list);
142    assert_eq!(value.y, vec![3u32, 4u32, 5u32]);
143
144    // reference types defined above that are only used to demonstrate reflect
145    // derive functionality:
146    _ = || -> (A, B, C, D, E, F) { unreachable!() };
147}
examples/reflection/dynamic_types.rs (line 116)
20fn main() {
21    #[derive(Reflect, Default, PartialEq, Debug)]
22    #[reflect(Identifiable, Default)]
23    struct Player {
24        id: u32,
25    }
26
27    #[reflect_trait]
28    trait Identifiable {
29        fn id(&self) -> u32;
30    }
31
32    impl Identifiable for Player {
33        fn id(&self) -> u32 {
34            self.id
35        }
36    }
37
38    // Normally, when instantiating a type, you get back exactly that type.
39    // This is because the type is known at compile time.
40    // We call this the "concrete" or "canonical" type.
41    let player: Player = Player { id: 123 };
42
43    // When working with reflected types, however, we often "erase" this type information
44    // using the `Reflect` trait object.
45    // This trait object also gives us access to all the methods in the `PartialReflect` trait too.
46    // The underlying type is still the same (in this case, `Player`),
47    // but now we've hidden that information from the compiler.
48    let reflected: Box<dyn Reflect> = Box::new(player);
49
50    // Because it's the same type under the hood, we can still downcast it back to the original type.
51    assert!(reflected.downcast_ref::<Player>().is_some());
52
53    // We can attempt to clone our value using `PartialReflect::reflect_clone`.
54    // This will recursively call `PartialReflect::reflect_clone` on all fields of the type.
55    // Or, if we had registered `ReflectClone` using `#[reflect(Clone)]`, it would simply call `Clone::clone` directly.
56    let cloned: Box<dyn Reflect> = reflected.reflect_clone().unwrap();
57    assert_eq!(cloned.downcast_ref::<Player>(), Some(&Player { id: 123 }));
58
59    // Another way we can "clone" our data is by converting it to a dynamic type.
60    // Notice here we bind it as a `dyn PartialReflect` instead of `dyn Reflect`.
61    // This is because it returns a dynamic type that simply represents the original type.
62    // In this case, because `Player` is a struct, it will return a `DynamicStruct`.
63    let dynamic: Box<dyn PartialReflect> = reflected.to_dynamic();
64    assert!(dynamic.is_dynamic());
65
66    // And if we try to convert it back to a `dyn Reflect` trait object, we'll get `None`.
67    // Dynamic types cannot be directly cast to `dyn Reflect` trait objects.
68    assert!(dynamic.try_as_reflect().is_none());
69
70    // Generally dynamic types are used to represent (or "proxy") the original type,
71    // so that we can continue to access its fields and overall structure.
72    let dynamic_ref = dynamic.reflect_ref().as_struct().unwrap();
73    let id = dynamic_ref.field("id").unwrap().try_downcast_ref::<u32>();
74    assert_eq!(id, Some(&123));
75
76    // It also enables us to create a representation of a type without having compile-time
77    // access to the actual type. This is how the reflection deserializers work.
78    // They generally can't know how to construct a type ahead of time,
79    // so they instead build and return these dynamic representations.
80    let input = "(id: 123)";
81    let mut registry = TypeRegistry::default();
82    registry.register::<Player>();
83    let registration = registry.get(std::any::TypeId::of::<Player>()).unwrap();
84    let deserialized = TypedReflectDeserializer::new(registration, &registry)
85        .deserialize(&mut ron::Deserializer::from_str(input).unwrap())
86        .unwrap();
87
88    // Our deserialized output is a `DynamicStruct` that proxies/represents a `Player`.
89    assert!(deserialized.represents::<Player>());
90
91    // And while this does allow us to access the fields and structure of the type,
92    // there may be instances where we need the actual type.
93    // For example, if we want to convert our `dyn Reflect` into a `dyn Identifiable`,
94    // we can't use the `DynamicStruct` proxy.
95    let reflect_identifiable = registration
96        .data::<ReflectIdentifiable>()
97        .expect("`ReflectIdentifiable` should be registered");
98
99    // Trying to access the registry with our `deserialized` will give a compile error
100    // since it doesn't implement `Reflect`, only `PartialReflect`.
101    // Similarly, trying to force the operation will fail.
102    // This fails since the underlying type of `deserialized` is `DynamicStruct` and not `Player`.
103    assert!(deserialized
104        .try_as_reflect()
105        .and_then(|reflect_trait_obj| reflect_identifiable.get(reflect_trait_obj))
106        .is_none());
107
108    // So how can we go from a dynamic type to a concrete type?
109    // There are two ways:
110
111    // 1. Using `PartialReflect::apply`.
112    {
113        // If you know the type at compile time, you can construct a new value and apply the dynamic
114        // value to it.
115        let mut value = Player::default();
116        value.apply(deserialized.as_ref());
117        assert_eq!(value.id, 123);
118
119        // If you don't know the type at compile time, you need a dynamic way of constructing
120        // an instance of the type. One such way is to use the `ReflectDefault` type data.
121        let reflect_default = registration
122            .data::<ReflectDefault>()
123            .expect("`ReflectDefault` should be registered");
124
125        let mut value: Box<dyn Reflect> = reflect_default.default();
126        value.apply(deserialized.as_ref());
127
128        let identifiable: &dyn Identifiable = reflect_identifiable.get(value.as_reflect()).unwrap();
129        assert_eq!(identifiable.id(), 123);
130    }
131
132    // 2. Using `FromReflect`
133    {
134        // If you know the type at compile time, you can use the `FromReflect` trait to convert the
135        // dynamic value into the concrete type directly.
136        let value: Player = Player::from_reflect(deserialized.as_ref()).unwrap();
137        assert_eq!(value.id, 123);
138
139        // If you don't know the type at compile time, you can use the `ReflectFromReflect` type data
140        // to perform the conversion dynamically.
141        let reflect_from_reflect = registration
142            .data::<ReflectFromReflect>()
143            .expect("`ReflectFromReflect` should be registered");
144
145        let value: Box<dyn Reflect> = reflect_from_reflect
146            .from_reflect(deserialized.as_ref())
147            .unwrap();
148        let identifiable: &dyn Identifiable = reflect_identifiable.get(value.as_reflect()).unwrap();
149        assert_eq!(identifiable.id(), 123);
150    }
151
152    // Lastly, while dynamic types are commonly generated via reflection methods like
153    // `PartialReflect::to_dynamic` or via the reflection deserializers,
154    // you can also construct them manually.
155    let mut my_dynamic_list = DynamicList::from_iter([1u32, 2u32, 3u32]);
156
157    // This is useful when you just need to apply some subset of changes to a type.
158    let mut my_list: Vec<u32> = Vec::new();
159    my_list.apply(&my_dynamic_list);
160    assert_eq!(my_list, vec![1, 2, 3]);
161
162    // And if you want it to actually proxy a type, you can configure it to do that as well:
163    assert!(!my_dynamic_list
164        .as_partial_reflect()
165        .represents::<Vec<u32>>());
166    my_dynamic_list.set_represented_type(Some(<Vec<u32>>::type_info()));
167    assert!(my_dynamic_list
168        .as_partial_reflect()
169        .represents::<Vec<u32>>());
170
171    // ============================= REFERENCE ============================= //
172    // For reference, here are all the available dynamic types:
173
174    // 1. `DynamicTuple`
175    {
176        let mut dynamic_tuple = DynamicTuple::default();
177        dynamic_tuple.insert(1u32);
178        dynamic_tuple.insert(2u32);
179        dynamic_tuple.insert(3u32);
180
181        let mut my_tuple: (u32, u32, u32) = (0, 0, 0);
182        my_tuple.apply(&dynamic_tuple);
183        assert_eq!(my_tuple, (1, 2, 3));
184    }
185
186    // 2. `DynamicArray`
187    {
188        let dynamic_array = DynamicArray::from_iter([1u32, 2u32, 3u32]);
189
190        let mut my_array = [0u32; 3];
191        my_array.apply(&dynamic_array);
192        assert_eq!(my_array, [1, 2, 3]);
193    }
194
195    // 3. `DynamicList`
196    {
197        let dynamic_list = DynamicList::from_iter([1u32, 2u32, 3u32]);
198
199        let mut my_list: Vec<u32> = Vec::new();
200        my_list.apply(&dynamic_list);
201        assert_eq!(my_list, vec![1, 2, 3]);
202    }
203
204    // 4. `DynamicSet`
205    {
206        let mut dynamic_set = DynamicSet::from_iter(["x", "y", "z"]);
207        assert!(dynamic_set.contains(&"x"));
208
209        dynamic_set.remove(&"y");
210
211        let mut my_set: HashSet<&str> = HashSet::default();
212        my_set.apply(&dynamic_set);
213        assert_eq!(my_set, HashSet::from_iter(["x", "z"]));
214    }
215
216    // 5. `DynamicMap`
217    {
218        let dynamic_map = DynamicMap::from_iter([("x", 1u32), ("y", 2u32), ("z", 3u32)]);
219
220        let mut my_map: HashMap<&str, u32> = HashMap::default();
221        my_map.apply(&dynamic_map);
222        assert_eq!(my_map.get("x"), Some(&1));
223        assert_eq!(my_map.get("y"), Some(&2));
224        assert_eq!(my_map.get("z"), Some(&3));
225    }
226
227    // 6. `DynamicStruct`
228    {
229        #[derive(Reflect, Default, Debug, PartialEq)]
230        struct MyStruct {
231            x: u32,
232            y: u32,
233            z: u32,
234        }
235
236        let mut dynamic_struct = DynamicStruct::default();
237        dynamic_struct.insert("x", 1u32);
238        dynamic_struct.insert("y", 2u32);
239        dynamic_struct.insert("z", 3u32);
240
241        let mut my_struct = MyStruct::default();
242        my_struct.apply(&dynamic_struct);
243        assert_eq!(my_struct, MyStruct { x: 1, y: 2, z: 3 });
244    }
245
246    // 7. `DynamicTupleStruct`
247    {
248        #[derive(Reflect, Default, Debug, PartialEq)]
249        struct MyTupleStruct(u32, u32, u32);
250
251        let mut dynamic_tuple_struct = DynamicTupleStruct::default();
252        dynamic_tuple_struct.insert(1u32);
253        dynamic_tuple_struct.insert(2u32);
254        dynamic_tuple_struct.insert(3u32);
255
256        let mut my_tuple_struct = MyTupleStruct::default();
257        my_tuple_struct.apply(&dynamic_tuple_struct);
258        assert_eq!(my_tuple_struct, MyTupleStruct(1, 2, 3));
259    }
260
261    // 8. `DynamicEnum`
262    {
263        #[derive(Reflect, Default, Debug, PartialEq)]
264        enum MyEnum {
265            #[default]
266            Empty,
267            Xyz(u32, u32, u32),
268        }
269
270        let mut values = DynamicTuple::default();
271        values.insert(1u32);
272        values.insert(2u32);
273        values.insert(3u32);
274
275        let dynamic_variant = DynamicVariant::Tuple(values);
276        let dynamic_enum = DynamicEnum::new("Xyz", dynamic_variant);
277
278        let mut my_enum = MyEnum::default();
279        my_enum.apply(&dynamic_enum);
280        assert_eq!(my_enum, MyEnum::Xyz(1, 2, 3));
281    }
282}
Source

fn reflect_kind(&self) -> ReflectKind

Returns a zero-sized enumeration of “kinds” of type.

See ReflectKind.

Source

fn to_dynamic(&self) -> Box<dyn PartialReflect>

Converts this reflected value into its dynamic representation based on its kind.

For example, a List type will internally invoke List::to_dynamic_list, returning DynamicList. A Struct type will invoke Struct::to_dynamic_struct, returning DynamicStruct. And so on.

If the kind is opaque, then the value will attempt to be cloned directly via reflect_clone, since opaque types do not have any standard dynamic representation.

To attempt to clone the value directly such that it returns a concrete instance of this type, use reflect_clone.

§Panics

This method will panic if the kind is opaque and the call to reflect_clone fails.

§Example
let value = (1, true, 3.14);
let dynamic_value = value.to_dynamic();
assert!(dynamic_value.is_dynamic())
Examples found in repository?
examples/reflection/dynamic_types.rs (line 63)
20fn main() {
21    #[derive(Reflect, Default, PartialEq, Debug)]
22    #[reflect(Identifiable, Default)]
23    struct Player {
24        id: u32,
25    }
26
27    #[reflect_trait]
28    trait Identifiable {
29        fn id(&self) -> u32;
30    }
31
32    impl Identifiable for Player {
33        fn id(&self) -> u32 {
34            self.id
35        }
36    }
37
38    // Normally, when instantiating a type, you get back exactly that type.
39    // This is because the type is known at compile time.
40    // We call this the "concrete" or "canonical" type.
41    let player: Player = Player { id: 123 };
42
43    // When working with reflected types, however, we often "erase" this type information
44    // using the `Reflect` trait object.
45    // This trait object also gives us access to all the methods in the `PartialReflect` trait too.
46    // The underlying type is still the same (in this case, `Player`),
47    // but now we've hidden that information from the compiler.
48    let reflected: Box<dyn Reflect> = Box::new(player);
49
50    // Because it's the same type under the hood, we can still downcast it back to the original type.
51    assert!(reflected.downcast_ref::<Player>().is_some());
52
53    // We can attempt to clone our value using `PartialReflect::reflect_clone`.
54    // This will recursively call `PartialReflect::reflect_clone` on all fields of the type.
55    // Or, if we had registered `ReflectClone` using `#[reflect(Clone)]`, it would simply call `Clone::clone` directly.
56    let cloned: Box<dyn Reflect> = reflected.reflect_clone().unwrap();
57    assert_eq!(cloned.downcast_ref::<Player>(), Some(&Player { id: 123 }));
58
59    // Another way we can "clone" our data is by converting it to a dynamic type.
60    // Notice here we bind it as a `dyn PartialReflect` instead of `dyn Reflect`.
61    // This is because it returns a dynamic type that simply represents the original type.
62    // In this case, because `Player` is a struct, it will return a `DynamicStruct`.
63    let dynamic: Box<dyn PartialReflect> = reflected.to_dynamic();
64    assert!(dynamic.is_dynamic());
65
66    // And if we try to convert it back to a `dyn Reflect` trait object, we'll get `None`.
67    // Dynamic types cannot be directly cast to `dyn Reflect` trait objects.
68    assert!(dynamic.try_as_reflect().is_none());
69
70    // Generally dynamic types are used to represent (or "proxy") the original type,
71    // so that we can continue to access its fields and overall structure.
72    let dynamic_ref = dynamic.reflect_ref().as_struct().unwrap();
73    let id = dynamic_ref.field("id").unwrap().try_downcast_ref::<u32>();
74    assert_eq!(id, Some(&123));
75
76    // It also enables us to create a representation of a type without having compile-time
77    // access to the actual type. This is how the reflection deserializers work.
78    // They generally can't know how to construct a type ahead of time,
79    // so they instead build and return these dynamic representations.
80    let input = "(id: 123)";
81    let mut registry = TypeRegistry::default();
82    registry.register::<Player>();
83    let registration = registry.get(std::any::TypeId::of::<Player>()).unwrap();
84    let deserialized = TypedReflectDeserializer::new(registration, &registry)
85        .deserialize(&mut ron::Deserializer::from_str(input).unwrap())
86        .unwrap();
87
88    // Our deserialized output is a `DynamicStruct` that proxies/represents a `Player`.
89    assert!(deserialized.represents::<Player>());
90
91    // And while this does allow us to access the fields and structure of the type,
92    // there may be instances where we need the actual type.
93    // For example, if we want to convert our `dyn Reflect` into a `dyn Identifiable`,
94    // we can't use the `DynamicStruct` proxy.
95    let reflect_identifiable = registration
96        .data::<ReflectIdentifiable>()
97        .expect("`ReflectIdentifiable` should be registered");
98
99    // Trying to access the registry with our `deserialized` will give a compile error
100    // since it doesn't implement `Reflect`, only `PartialReflect`.
101    // Similarly, trying to force the operation will fail.
102    // This fails since the underlying type of `deserialized` is `DynamicStruct` and not `Player`.
103    assert!(deserialized
104        .try_as_reflect()
105        .and_then(|reflect_trait_obj| reflect_identifiable.get(reflect_trait_obj))
106        .is_none());
107
108    // So how can we go from a dynamic type to a concrete type?
109    // There are two ways:
110
111    // 1. Using `PartialReflect::apply`.
112    {
113        // If you know the type at compile time, you can construct a new value and apply the dynamic
114        // value to it.
115        let mut value = Player::default();
116        value.apply(deserialized.as_ref());
117        assert_eq!(value.id, 123);
118
119        // If you don't know the type at compile time, you need a dynamic way of constructing
120        // an instance of the type. One such way is to use the `ReflectDefault` type data.
121        let reflect_default = registration
122            .data::<ReflectDefault>()
123            .expect("`ReflectDefault` should be registered");
124
125        let mut value: Box<dyn Reflect> = reflect_default.default();
126        value.apply(deserialized.as_ref());
127
128        let identifiable: &dyn Identifiable = reflect_identifiable.get(value.as_reflect()).unwrap();
129        assert_eq!(identifiable.id(), 123);
130    }
131
132    // 2. Using `FromReflect`
133    {
134        // If you know the type at compile time, you can use the `FromReflect` trait to convert the
135        // dynamic value into the concrete type directly.
136        let value: Player = Player::from_reflect(deserialized.as_ref()).unwrap();
137        assert_eq!(value.id, 123);
138
139        // If you don't know the type at compile time, you can use the `ReflectFromReflect` type data
140        // to perform the conversion dynamically.
141        let reflect_from_reflect = registration
142            .data::<ReflectFromReflect>()
143            .expect("`ReflectFromReflect` should be registered");
144
145        let value: Box<dyn Reflect> = reflect_from_reflect
146            .from_reflect(deserialized.as_ref())
147            .unwrap();
148        let identifiable: &dyn Identifiable = reflect_identifiable.get(value.as_reflect()).unwrap();
149        assert_eq!(identifiable.id(), 123);
150    }
151
152    // Lastly, while dynamic types are commonly generated via reflection methods like
153    // `PartialReflect::to_dynamic` or via the reflection deserializers,
154    // you can also construct them manually.
155    let mut my_dynamic_list = DynamicList::from_iter([1u32, 2u32, 3u32]);
156
157    // This is useful when you just need to apply some subset of changes to a type.
158    let mut my_list: Vec<u32> = Vec::new();
159    my_list.apply(&my_dynamic_list);
160    assert_eq!(my_list, vec![1, 2, 3]);
161
162    // And if you want it to actually proxy a type, you can configure it to do that as well:
163    assert!(!my_dynamic_list
164        .as_partial_reflect()
165        .represents::<Vec<u32>>());
166    my_dynamic_list.set_represented_type(Some(<Vec<u32>>::type_info()));
167    assert!(my_dynamic_list
168        .as_partial_reflect()
169        .represents::<Vec<u32>>());
170
171    // ============================= REFERENCE ============================= //
172    // For reference, here are all the available dynamic types:
173
174    // 1. `DynamicTuple`
175    {
176        let mut dynamic_tuple = DynamicTuple::default();
177        dynamic_tuple.insert(1u32);
178        dynamic_tuple.insert(2u32);
179        dynamic_tuple.insert(3u32);
180
181        let mut my_tuple: (u32, u32, u32) = (0, 0, 0);
182        my_tuple.apply(&dynamic_tuple);
183        assert_eq!(my_tuple, (1, 2, 3));
184    }
185
186    // 2. `DynamicArray`
187    {
188        let dynamic_array = DynamicArray::from_iter([1u32, 2u32, 3u32]);
189
190        let mut my_array = [0u32; 3];
191        my_array.apply(&dynamic_array);
192        assert_eq!(my_array, [1, 2, 3]);
193    }
194
195    // 3. `DynamicList`
196    {
197        let dynamic_list = DynamicList::from_iter([1u32, 2u32, 3u32]);
198
199        let mut my_list: Vec<u32> = Vec::new();
200        my_list.apply(&dynamic_list);
201        assert_eq!(my_list, vec![1, 2, 3]);
202    }
203
204    // 4. `DynamicSet`
205    {
206        let mut dynamic_set = DynamicSet::from_iter(["x", "y", "z"]);
207        assert!(dynamic_set.contains(&"x"));
208
209        dynamic_set.remove(&"y");
210
211        let mut my_set: HashSet<&str> = HashSet::default();
212        my_set.apply(&dynamic_set);
213        assert_eq!(my_set, HashSet::from_iter(["x", "z"]));
214    }
215
216    // 5. `DynamicMap`
217    {
218        let dynamic_map = DynamicMap::from_iter([("x", 1u32), ("y", 2u32), ("z", 3u32)]);
219
220        let mut my_map: HashMap<&str, u32> = HashMap::default();
221        my_map.apply(&dynamic_map);
222        assert_eq!(my_map.get("x"), Some(&1));
223        assert_eq!(my_map.get("y"), Some(&2));
224        assert_eq!(my_map.get("z"), Some(&3));
225    }
226
227    // 6. `DynamicStruct`
228    {
229        #[derive(Reflect, Default, Debug, PartialEq)]
230        struct MyStruct {
231            x: u32,
232            y: u32,
233            z: u32,
234        }
235
236        let mut dynamic_struct = DynamicStruct::default();
237        dynamic_struct.insert("x", 1u32);
238        dynamic_struct.insert("y", 2u32);
239        dynamic_struct.insert("z", 3u32);
240
241        let mut my_struct = MyStruct::default();
242        my_struct.apply(&dynamic_struct);
243        assert_eq!(my_struct, MyStruct { x: 1, y: 2, z: 3 });
244    }
245
246    // 7. `DynamicTupleStruct`
247    {
248        #[derive(Reflect, Default, Debug, PartialEq)]
249        struct MyTupleStruct(u32, u32, u32);
250
251        let mut dynamic_tuple_struct = DynamicTupleStruct::default();
252        dynamic_tuple_struct.insert(1u32);
253        dynamic_tuple_struct.insert(2u32);
254        dynamic_tuple_struct.insert(3u32);
255
256        let mut my_tuple_struct = MyTupleStruct::default();
257        my_tuple_struct.apply(&dynamic_tuple_struct);
258        assert_eq!(my_tuple_struct, MyTupleStruct(1, 2, 3));
259    }
260
261    // 8. `DynamicEnum`
262    {
263        #[derive(Reflect, Default, Debug, PartialEq)]
264        enum MyEnum {
265            #[default]
266            Empty,
267            Xyz(u32, u32, u32),
268        }
269
270        let mut values = DynamicTuple::default();
271        values.insert(1u32);
272        values.insert(2u32);
273        values.insert(3u32);
274
275        let dynamic_variant = DynamicVariant::Tuple(values);
276        let dynamic_enum = DynamicEnum::new("Xyz", dynamic_variant);
277
278        let mut my_enum = MyEnum::default();
279        my_enum.apply(&dynamic_enum);
280        assert_eq!(my_enum, MyEnum::Xyz(1, 2, 3));
281    }
282}
Source

fn reflect_clone(&self) -> Result<Box<dyn Reflect>, ReflectCloneError>

Attempts to clone Self using reflection.

Unlike to_dynamic, which generally returns a dynamic representation of Self, this method attempts create a clone of Self directly, if possible.

If the clone cannot be performed, an appropriate ReflectCloneError is returned.

§Example
let value = (1, true, 3.14);
let cloned = value.reflect_clone().unwrap();
assert!(cloned.is::<(i32, bool, f64)>())
Examples found in repository?
examples/reflection/dynamic_types.rs (line 56)
20fn main() {
21    #[derive(Reflect, Default, PartialEq, Debug)]
22    #[reflect(Identifiable, Default)]
23    struct Player {
24        id: u32,
25    }
26
27    #[reflect_trait]
28    trait Identifiable {
29        fn id(&self) -> u32;
30    }
31
32    impl Identifiable for Player {
33        fn id(&self) -> u32 {
34            self.id
35        }
36    }
37
38    // Normally, when instantiating a type, you get back exactly that type.
39    // This is because the type is known at compile time.
40    // We call this the "concrete" or "canonical" type.
41    let player: Player = Player { id: 123 };
42
43    // When working with reflected types, however, we often "erase" this type information
44    // using the `Reflect` trait object.
45    // This trait object also gives us access to all the methods in the `PartialReflect` trait too.
46    // The underlying type is still the same (in this case, `Player`),
47    // but now we've hidden that information from the compiler.
48    let reflected: Box<dyn Reflect> = Box::new(player);
49
50    // Because it's the same type under the hood, we can still downcast it back to the original type.
51    assert!(reflected.downcast_ref::<Player>().is_some());
52
53    // We can attempt to clone our value using `PartialReflect::reflect_clone`.
54    // This will recursively call `PartialReflect::reflect_clone` on all fields of the type.
55    // Or, if we had registered `ReflectClone` using `#[reflect(Clone)]`, it would simply call `Clone::clone` directly.
56    let cloned: Box<dyn Reflect> = reflected.reflect_clone().unwrap();
57    assert_eq!(cloned.downcast_ref::<Player>(), Some(&Player { id: 123 }));
58
59    // Another way we can "clone" our data is by converting it to a dynamic type.
60    // Notice here we bind it as a `dyn PartialReflect` instead of `dyn Reflect`.
61    // This is because it returns a dynamic type that simply represents the original type.
62    // In this case, because `Player` is a struct, it will return a `DynamicStruct`.
63    let dynamic: Box<dyn PartialReflect> = reflected.to_dynamic();
64    assert!(dynamic.is_dynamic());
65
66    // And if we try to convert it back to a `dyn Reflect` trait object, we'll get `None`.
67    // Dynamic types cannot be directly cast to `dyn Reflect` trait objects.
68    assert!(dynamic.try_as_reflect().is_none());
69
70    // Generally dynamic types are used to represent (or "proxy") the original type,
71    // so that we can continue to access its fields and overall structure.
72    let dynamic_ref = dynamic.reflect_ref().as_struct().unwrap();
73    let id = dynamic_ref.field("id").unwrap().try_downcast_ref::<u32>();
74    assert_eq!(id, Some(&123));
75
76    // It also enables us to create a representation of a type without having compile-time
77    // access to the actual type. This is how the reflection deserializers work.
78    // They generally can't know how to construct a type ahead of time,
79    // so they instead build and return these dynamic representations.
80    let input = "(id: 123)";
81    let mut registry = TypeRegistry::default();
82    registry.register::<Player>();
83    let registration = registry.get(std::any::TypeId::of::<Player>()).unwrap();
84    let deserialized = TypedReflectDeserializer::new(registration, &registry)
85        .deserialize(&mut ron::Deserializer::from_str(input).unwrap())
86        .unwrap();
87
88    // Our deserialized output is a `DynamicStruct` that proxies/represents a `Player`.
89    assert!(deserialized.represents::<Player>());
90
91    // And while this does allow us to access the fields and structure of the type,
92    // there may be instances where we need the actual type.
93    // For example, if we want to convert our `dyn Reflect` into a `dyn Identifiable`,
94    // we can't use the `DynamicStruct` proxy.
95    let reflect_identifiable = registration
96        .data::<ReflectIdentifiable>()
97        .expect("`ReflectIdentifiable` should be registered");
98
99    // Trying to access the registry with our `deserialized` will give a compile error
100    // since it doesn't implement `Reflect`, only `PartialReflect`.
101    // Similarly, trying to force the operation will fail.
102    // This fails since the underlying type of `deserialized` is `DynamicStruct` and not `Player`.
103    assert!(deserialized
104        .try_as_reflect()
105        .and_then(|reflect_trait_obj| reflect_identifiable.get(reflect_trait_obj))
106        .is_none());
107
108    // So how can we go from a dynamic type to a concrete type?
109    // There are two ways:
110
111    // 1. Using `PartialReflect::apply`.
112    {
113        // If you know the type at compile time, you can construct a new value and apply the dynamic
114        // value to it.
115        let mut value = Player::default();
116        value.apply(deserialized.as_ref());
117        assert_eq!(value.id, 123);
118
119        // If you don't know the type at compile time, you need a dynamic way of constructing
120        // an instance of the type. One such way is to use the `ReflectDefault` type data.
121        let reflect_default = registration
122            .data::<ReflectDefault>()
123            .expect("`ReflectDefault` should be registered");
124
125        let mut value: Box<dyn Reflect> = reflect_default.default();
126        value.apply(deserialized.as_ref());
127
128        let identifiable: &dyn Identifiable = reflect_identifiable.get(value.as_reflect()).unwrap();
129        assert_eq!(identifiable.id(), 123);
130    }
131
132    // 2. Using `FromReflect`
133    {
134        // If you know the type at compile time, you can use the `FromReflect` trait to convert the
135        // dynamic value into the concrete type directly.
136        let value: Player = Player::from_reflect(deserialized.as_ref()).unwrap();
137        assert_eq!(value.id, 123);
138
139        // If you don't know the type at compile time, you can use the `ReflectFromReflect` type data
140        // to perform the conversion dynamically.
141        let reflect_from_reflect = registration
142            .data::<ReflectFromReflect>()
143            .expect("`ReflectFromReflect` should be registered");
144
145        let value: Box<dyn Reflect> = reflect_from_reflect
146            .from_reflect(deserialized.as_ref())
147            .unwrap();
148        let identifiable: &dyn Identifiable = reflect_identifiable.get(value.as_reflect()).unwrap();
149        assert_eq!(identifiable.id(), 123);
150    }
151
152    // Lastly, while dynamic types are commonly generated via reflection methods like
153    // `PartialReflect::to_dynamic` or via the reflection deserializers,
154    // you can also construct them manually.
155    let mut my_dynamic_list = DynamicList::from_iter([1u32, 2u32, 3u32]);
156
157    // This is useful when you just need to apply some subset of changes to a type.
158    let mut my_list: Vec<u32> = Vec::new();
159    my_list.apply(&my_dynamic_list);
160    assert_eq!(my_list, vec![1, 2, 3]);
161
162    // And if you want it to actually proxy a type, you can configure it to do that as well:
163    assert!(!my_dynamic_list
164        .as_partial_reflect()
165        .represents::<Vec<u32>>());
166    my_dynamic_list.set_represented_type(Some(<Vec<u32>>::type_info()));
167    assert!(my_dynamic_list
168        .as_partial_reflect()
169        .represents::<Vec<u32>>());
170
171    // ============================= REFERENCE ============================= //
172    // For reference, here are all the available dynamic types:
173
174    // 1. `DynamicTuple`
175    {
176        let mut dynamic_tuple = DynamicTuple::default();
177        dynamic_tuple.insert(1u32);
178        dynamic_tuple.insert(2u32);
179        dynamic_tuple.insert(3u32);
180
181        let mut my_tuple: (u32, u32, u32) = (0, 0, 0);
182        my_tuple.apply(&dynamic_tuple);
183        assert_eq!(my_tuple, (1, 2, 3));
184    }
185
186    // 2. `DynamicArray`
187    {
188        let dynamic_array = DynamicArray::from_iter([1u32, 2u32, 3u32]);
189
190        let mut my_array = [0u32; 3];
191        my_array.apply(&dynamic_array);
192        assert_eq!(my_array, [1, 2, 3]);
193    }
194
195    // 3. `DynamicList`
196    {
197        let dynamic_list = DynamicList::from_iter([1u32, 2u32, 3u32]);
198
199        let mut my_list: Vec<u32> = Vec::new();
200        my_list.apply(&dynamic_list);
201        assert_eq!(my_list, vec![1, 2, 3]);
202    }
203
204    // 4. `DynamicSet`
205    {
206        let mut dynamic_set = DynamicSet::from_iter(["x", "y", "z"]);
207        assert!(dynamic_set.contains(&"x"));
208
209        dynamic_set.remove(&"y");
210
211        let mut my_set: HashSet<&str> = HashSet::default();
212        my_set.apply(&dynamic_set);
213        assert_eq!(my_set, HashSet::from_iter(["x", "z"]));
214    }
215
216    // 5. `DynamicMap`
217    {
218        let dynamic_map = DynamicMap::from_iter([("x", 1u32), ("y", 2u32), ("z", 3u32)]);
219
220        let mut my_map: HashMap<&str, u32> = HashMap::default();
221        my_map.apply(&dynamic_map);
222        assert_eq!(my_map.get("x"), Some(&1));
223        assert_eq!(my_map.get("y"), Some(&2));
224        assert_eq!(my_map.get("z"), Some(&3));
225    }
226
227    // 6. `DynamicStruct`
228    {
229        #[derive(Reflect, Default, Debug, PartialEq)]
230        struct MyStruct {
231            x: u32,
232            y: u32,
233            z: u32,
234        }
235
236        let mut dynamic_struct = DynamicStruct::default();
237        dynamic_struct.insert("x", 1u32);
238        dynamic_struct.insert("y", 2u32);
239        dynamic_struct.insert("z", 3u32);
240
241        let mut my_struct = MyStruct::default();
242        my_struct.apply(&dynamic_struct);
243        assert_eq!(my_struct, MyStruct { x: 1, y: 2, z: 3 });
244    }
245
246    // 7. `DynamicTupleStruct`
247    {
248        #[derive(Reflect, Default, Debug, PartialEq)]
249        struct MyTupleStruct(u32, u32, u32);
250
251        let mut dynamic_tuple_struct = DynamicTupleStruct::default();
252        dynamic_tuple_struct.insert(1u32);
253        dynamic_tuple_struct.insert(2u32);
254        dynamic_tuple_struct.insert(3u32);
255
256        let mut my_tuple_struct = MyTupleStruct::default();
257        my_tuple_struct.apply(&dynamic_tuple_struct);
258        assert_eq!(my_tuple_struct, MyTupleStruct(1, 2, 3));
259    }
260
261    // 8. `DynamicEnum`
262    {
263        #[derive(Reflect, Default, Debug, PartialEq)]
264        enum MyEnum {
265            #[default]
266            Empty,
267            Xyz(u32, u32, u32),
268        }
269
270        let mut values = DynamicTuple::default();
271        values.insert(1u32);
272        values.insert(2u32);
273        values.insert(3u32);
274
275        let dynamic_variant = DynamicVariant::Tuple(values);
276        let dynamic_enum = DynamicEnum::new("Xyz", dynamic_variant);
277
278        let mut my_enum = MyEnum::default();
279        my_enum.apply(&dynamic_enum);
280        assert_eq!(my_enum, MyEnum::Xyz(1, 2, 3));
281    }
282}
Source

fn reflect_clone_and_take<T>(&self) -> Result<T, ReflectCloneError>
where T: 'static, Self: Sized + TypePath,

For a type implementing PartialReflect, combines reflect_clone and take in a useful fashion, automatically constructing an appropriate ReflectCloneError if the downcast fails.

Source

fn reflect_hash(&self) -> Option<u64>

Returns a hash of the value (which includes the type).

If the underlying type does not support hashing, returns None.

Source

fn reflect_partial_eq( &self, _value: &(dyn PartialReflect + 'static), ) -> Option<bool>

Returns a “partial equality” comparison result.

If the underlying type does not support equality testing, returns None.

Examples found in repository?
examples/reflection/reflection.rs (line 115)
55fn setup(type_registry: Res<AppTypeRegistry>) {
56    let mut value = Foo {
57        a: 1,
58        _ignored: NonReflectedValue { _a: 10 },
59        nested: Bar { b: 8 },
60    };
61
62    // You can set field values like this. The type must match exactly or this will fail.
63    *value.get_field_mut("a").unwrap() = 2usize;
64    assert_eq!(value.a, 2);
65    assert_eq!(*value.get_field::<usize>("a").unwrap(), 2);
66
67    // You can also get the `&dyn PartialReflect` value of a field like this
68    let field = value.field("a").unwrap();
69
70    // But values introspected via `PartialReflect` will not return `dyn Reflect` trait objects
71    // (even if the containing type does implement `Reflect`), so we need to convert them:
72    let fully_reflected_field = field.try_as_reflect().unwrap();
73
74    // Now, you can downcast your `Reflect` value like this:
75    assert_eq!(*fully_reflected_field.downcast_ref::<usize>().unwrap(), 2);
76
77    // For this specific case, we also support the shortcut `try_downcast_ref`:
78    assert_eq!(*field.try_downcast_ref::<usize>().unwrap(), 2);
79
80    // `DynamicStruct` also implements the `Struct` and `Reflect` traits.
81    let mut patch = DynamicStruct::default();
82    patch.insert("a", 4usize);
83
84    // You can "apply" Reflect implementations on top of other Reflect implementations.
85    // This will only set fields with the same name, and it will fail if the types don't match.
86    // You can use this to "patch" your types with new values.
87    value.apply(&patch);
88    assert_eq!(value.a, 4);
89
90    let type_registry = type_registry.read();
91    // By default, all derived `Reflect` types can be Serialized using serde. No need to derive
92    // Serialize!
93    let serializer = ReflectSerializer::new(&value, &type_registry);
94    let ron_string =
95        ron::ser::to_string_pretty(&serializer, ron::ser::PrettyConfig::default()).unwrap();
96    info!("{}\n", ron_string);
97
98    // Dynamic properties can be deserialized
99    let reflect_deserializer = ReflectDeserializer::new(&type_registry);
100    let mut deserializer = ron::de::Deserializer::from_str(&ron_string).unwrap();
101    let reflect_value = reflect_deserializer.deserialize(&mut deserializer).unwrap();
102
103    // Deserializing returns a `Box<dyn PartialReflect>` value.
104    // Generally, deserializing a value will return the "dynamic" variant of a type.
105    // For example, deserializing a struct will return the DynamicStruct type.
106    // "Opaque types" will be deserialized as themselves.
107    assert_eq!(
108        reflect_value.reflect_type_path(),
109        DynamicStruct::type_path(),
110    );
111
112    // Reflect has its own `partial_eq` implementation, named `reflect_partial_eq`. This behaves
113    // like normal `partial_eq`, but it treats "dynamic" and "non-dynamic" types the same. The
114    // `Foo` struct and deserialized `DynamicStruct` are considered equal for this reason:
115    assert!(reflect_value.reflect_partial_eq(&value).unwrap());
116
117    // By "patching" `Foo` with the deserialized DynamicStruct, we can "Deserialize" Foo.
118    // This means we can serialize and deserialize with a single `Reflect` derive!
119    value.apply(&*reflect_value);
120}
Source

fn reflect_partial_cmp( &self, _value: &(dyn PartialReflect + 'static), ) -> Option<Ordering>

Returns a “partial comparison” result.

If the underlying type does not support it, returns None.

Source

fn debug(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Debug formatter for the value.

Any value that is not an implementor of other Reflect subtraits (e.g. List, Map), will default to the format: "Reflect(type_path)", where type_path is the type path of the underlying type.

Source

fn is_dynamic(&self) -> bool

Indicates whether or not this type is a dynamic type.

Dynamic types include the ones built-in to this crate, such as DynamicStruct, DynamicList, and DynamicTuple. However, they may be custom types used as proxies for other types or to facilitate scripting capabilities.

By default, this method will return false.

Examples found in repository?
examples/reflection/dynamic_types.rs (line 64)
20fn main() {
21    #[derive(Reflect, Default, PartialEq, Debug)]
22    #[reflect(Identifiable, Default)]
23    struct Player {
24        id: u32,
25    }
26
27    #[reflect_trait]
28    trait Identifiable {
29        fn id(&self) -> u32;
30    }
31
32    impl Identifiable for Player {
33        fn id(&self) -> u32 {
34            self.id
35        }
36    }
37
38    // Normally, when instantiating a type, you get back exactly that type.
39    // This is because the type is known at compile time.
40    // We call this the "concrete" or "canonical" type.
41    let player: Player = Player { id: 123 };
42
43    // When working with reflected types, however, we often "erase" this type information
44    // using the `Reflect` trait object.
45    // This trait object also gives us access to all the methods in the `PartialReflect` trait too.
46    // The underlying type is still the same (in this case, `Player`),
47    // but now we've hidden that information from the compiler.
48    let reflected: Box<dyn Reflect> = Box::new(player);
49
50    // Because it's the same type under the hood, we can still downcast it back to the original type.
51    assert!(reflected.downcast_ref::<Player>().is_some());
52
53    // We can attempt to clone our value using `PartialReflect::reflect_clone`.
54    // This will recursively call `PartialReflect::reflect_clone` on all fields of the type.
55    // Or, if we had registered `ReflectClone` using `#[reflect(Clone)]`, it would simply call `Clone::clone` directly.
56    let cloned: Box<dyn Reflect> = reflected.reflect_clone().unwrap();
57    assert_eq!(cloned.downcast_ref::<Player>(), Some(&Player { id: 123 }));
58
59    // Another way we can "clone" our data is by converting it to a dynamic type.
60    // Notice here we bind it as a `dyn PartialReflect` instead of `dyn Reflect`.
61    // This is because it returns a dynamic type that simply represents the original type.
62    // In this case, because `Player` is a struct, it will return a `DynamicStruct`.
63    let dynamic: Box<dyn PartialReflect> = reflected.to_dynamic();
64    assert!(dynamic.is_dynamic());
65
66    // And if we try to convert it back to a `dyn Reflect` trait object, we'll get `None`.
67    // Dynamic types cannot be directly cast to `dyn Reflect` trait objects.
68    assert!(dynamic.try_as_reflect().is_none());
69
70    // Generally dynamic types are used to represent (or "proxy") the original type,
71    // so that we can continue to access its fields and overall structure.
72    let dynamic_ref = dynamic.reflect_ref().as_struct().unwrap();
73    let id = dynamic_ref.field("id").unwrap().try_downcast_ref::<u32>();
74    assert_eq!(id, Some(&123));
75
76    // It also enables us to create a representation of a type without having compile-time
77    // access to the actual type. This is how the reflection deserializers work.
78    // They generally can't know how to construct a type ahead of time,
79    // so they instead build and return these dynamic representations.
80    let input = "(id: 123)";
81    let mut registry = TypeRegistry::default();
82    registry.register::<Player>();
83    let registration = registry.get(std::any::TypeId::of::<Player>()).unwrap();
84    let deserialized = TypedReflectDeserializer::new(registration, &registry)
85        .deserialize(&mut ron::Deserializer::from_str(input).unwrap())
86        .unwrap();
87
88    // Our deserialized output is a `DynamicStruct` that proxies/represents a `Player`.
89    assert!(deserialized.represents::<Player>());
90
91    // And while this does allow us to access the fields and structure of the type,
92    // there may be instances where we need the actual type.
93    // For example, if we want to convert our `dyn Reflect` into a `dyn Identifiable`,
94    // we can't use the `DynamicStruct` proxy.
95    let reflect_identifiable = registration
96        .data::<ReflectIdentifiable>()
97        .expect("`ReflectIdentifiable` should be registered");
98
99    // Trying to access the registry with our `deserialized` will give a compile error
100    // since it doesn't implement `Reflect`, only `PartialReflect`.
101    // Similarly, trying to force the operation will fail.
102    // This fails since the underlying type of `deserialized` is `DynamicStruct` and not `Player`.
103    assert!(deserialized
104        .try_as_reflect()
105        .and_then(|reflect_trait_obj| reflect_identifiable.get(reflect_trait_obj))
106        .is_none());
107
108    // So how can we go from a dynamic type to a concrete type?
109    // There are two ways:
110
111    // 1. Using `PartialReflect::apply`.
112    {
113        // If you know the type at compile time, you can construct a new value and apply the dynamic
114        // value to it.
115        let mut value = Player::default();
116        value.apply(deserialized.as_ref());
117        assert_eq!(value.id, 123);
118
119        // If you don't know the type at compile time, you need a dynamic way of constructing
120        // an instance of the type. One such way is to use the `ReflectDefault` type data.
121        let reflect_default = registration
122            .data::<ReflectDefault>()
123            .expect("`ReflectDefault` should be registered");
124
125        let mut value: Box<dyn Reflect> = reflect_default.default();
126        value.apply(deserialized.as_ref());
127
128        let identifiable: &dyn Identifiable = reflect_identifiable.get(value.as_reflect()).unwrap();
129        assert_eq!(identifiable.id(), 123);
130    }
131
132    // 2. Using `FromReflect`
133    {
134        // If you know the type at compile time, you can use the `FromReflect` trait to convert the
135        // dynamic value into the concrete type directly.
136        let value: Player = Player::from_reflect(deserialized.as_ref()).unwrap();
137        assert_eq!(value.id, 123);
138
139        // If you don't know the type at compile time, you can use the `ReflectFromReflect` type data
140        // to perform the conversion dynamically.
141        let reflect_from_reflect = registration
142            .data::<ReflectFromReflect>()
143            .expect("`ReflectFromReflect` should be registered");
144
145        let value: Box<dyn Reflect> = reflect_from_reflect
146            .from_reflect(deserialized.as_ref())
147            .unwrap();
148        let identifiable: &dyn Identifiable = reflect_identifiable.get(value.as_reflect()).unwrap();
149        assert_eq!(identifiable.id(), 123);
150    }
151
152    // Lastly, while dynamic types are commonly generated via reflection methods like
153    // `PartialReflect::to_dynamic` or via the reflection deserializers,
154    // you can also construct them manually.
155    let mut my_dynamic_list = DynamicList::from_iter([1u32, 2u32, 3u32]);
156
157    // This is useful when you just need to apply some subset of changes to a type.
158    let mut my_list: Vec<u32> = Vec::new();
159    my_list.apply(&my_dynamic_list);
160    assert_eq!(my_list, vec![1, 2, 3]);
161
162    // And if you want it to actually proxy a type, you can configure it to do that as well:
163    assert!(!my_dynamic_list
164        .as_partial_reflect()
165        .represents::<Vec<u32>>());
166    my_dynamic_list.set_represented_type(Some(<Vec<u32>>::type_info()));
167    assert!(my_dynamic_list
168        .as_partial_reflect()
169        .represents::<Vec<u32>>());
170
171    // ============================= REFERENCE ============================= //
172    // For reference, here are all the available dynamic types:
173
174    // 1. `DynamicTuple`
175    {
176        let mut dynamic_tuple = DynamicTuple::default();
177        dynamic_tuple.insert(1u32);
178        dynamic_tuple.insert(2u32);
179        dynamic_tuple.insert(3u32);
180
181        let mut my_tuple: (u32, u32, u32) = (0, 0, 0);
182        my_tuple.apply(&dynamic_tuple);
183        assert_eq!(my_tuple, (1, 2, 3));
184    }
185
186    // 2. `DynamicArray`
187    {
188        let dynamic_array = DynamicArray::from_iter([1u32, 2u32, 3u32]);
189
190        let mut my_array = [0u32; 3];
191        my_array.apply(&dynamic_array);
192        assert_eq!(my_array, [1, 2, 3]);
193    }
194
195    // 3. `DynamicList`
196    {
197        let dynamic_list = DynamicList::from_iter([1u32, 2u32, 3u32]);
198
199        let mut my_list: Vec<u32> = Vec::new();
200        my_list.apply(&dynamic_list);
201        assert_eq!(my_list, vec![1, 2, 3]);
202    }
203
204    // 4. `DynamicSet`
205    {
206        let mut dynamic_set = DynamicSet::from_iter(["x", "y", "z"]);
207        assert!(dynamic_set.contains(&"x"));
208
209        dynamic_set.remove(&"y");
210
211        let mut my_set: HashSet<&str> = HashSet::default();
212        my_set.apply(&dynamic_set);
213        assert_eq!(my_set, HashSet::from_iter(["x", "z"]));
214    }
215
216    // 5. `DynamicMap`
217    {
218        let dynamic_map = DynamicMap::from_iter([("x", 1u32), ("y", 2u32), ("z", 3u32)]);
219
220        let mut my_map: HashMap<&str, u32> = HashMap::default();
221        my_map.apply(&dynamic_map);
222        assert_eq!(my_map.get("x"), Some(&1));
223        assert_eq!(my_map.get("y"), Some(&2));
224        assert_eq!(my_map.get("z"), Some(&3));
225    }
226
227    // 6. `DynamicStruct`
228    {
229        #[derive(Reflect, Default, Debug, PartialEq)]
230        struct MyStruct {
231            x: u32,
232            y: u32,
233            z: u32,
234        }
235
236        let mut dynamic_struct = DynamicStruct::default();
237        dynamic_struct.insert("x", 1u32);
238        dynamic_struct.insert("y", 2u32);
239        dynamic_struct.insert("z", 3u32);
240
241        let mut my_struct = MyStruct::default();
242        my_struct.apply(&dynamic_struct);
243        assert_eq!(my_struct, MyStruct { x: 1, y: 2, z: 3 });
244    }
245
246    // 7. `DynamicTupleStruct`
247    {
248        #[derive(Reflect, Default, Debug, PartialEq)]
249        struct MyTupleStruct(u32, u32, u32);
250
251        let mut dynamic_tuple_struct = DynamicTupleStruct::default();
252        dynamic_tuple_struct.insert(1u32);
253        dynamic_tuple_struct.insert(2u32);
254        dynamic_tuple_struct.insert(3u32);
255
256        let mut my_tuple_struct = MyTupleStruct::default();
257        my_tuple_struct.apply(&dynamic_tuple_struct);
258        assert_eq!(my_tuple_struct, MyTupleStruct(1, 2, 3));
259    }
260
261    // 8. `DynamicEnum`
262    {
263        #[derive(Reflect, Default, Debug, PartialEq)]
264        enum MyEnum {
265            #[default]
266            Empty,
267            Xyz(u32, u32, u32),
268        }
269
270        let mut values = DynamicTuple::default();
271        values.insert(1u32);
272        values.insert(2u32);
273        values.insert(3u32);
274
275        let dynamic_variant = DynamicVariant::Tuple(values);
276        let dynamic_enum = DynamicEnum::new("Xyz", dynamic_variant);
277
278        let mut my_enum = MyEnum::default();
279        my_enum.apply(&dynamic_enum);
280        assert_eq!(my_enum, MyEnum::Xyz(1, 2, 3));
281    }
282}

Implementations§

Source§

impl dyn PartialReflect

Source

pub fn represents<T>(&self) -> bool
where T: Reflect + TypePath,

Returns true if the underlying value represents a value of type T, or false otherwise.

Read is for more information on underlying values and represented types.

Examples found in repository?
examples/reflection/dynamic_types.rs (line 89)
20fn main() {
21    #[derive(Reflect, Default, PartialEq, Debug)]
22    #[reflect(Identifiable, Default)]
23    struct Player {
24        id: u32,
25    }
26
27    #[reflect_trait]
28    trait Identifiable {
29        fn id(&self) -> u32;
30    }
31
32    impl Identifiable for Player {
33        fn id(&self) -> u32 {
34            self.id
35        }
36    }
37
38    // Normally, when instantiating a type, you get back exactly that type.
39    // This is because the type is known at compile time.
40    // We call this the "concrete" or "canonical" type.
41    let player: Player = Player { id: 123 };
42
43    // When working with reflected types, however, we often "erase" this type information
44    // using the `Reflect` trait object.
45    // This trait object also gives us access to all the methods in the `PartialReflect` trait too.
46    // The underlying type is still the same (in this case, `Player`),
47    // but now we've hidden that information from the compiler.
48    let reflected: Box<dyn Reflect> = Box::new(player);
49
50    // Because it's the same type under the hood, we can still downcast it back to the original type.
51    assert!(reflected.downcast_ref::<Player>().is_some());
52
53    // We can attempt to clone our value using `PartialReflect::reflect_clone`.
54    // This will recursively call `PartialReflect::reflect_clone` on all fields of the type.
55    // Or, if we had registered `ReflectClone` using `#[reflect(Clone)]`, it would simply call `Clone::clone` directly.
56    let cloned: Box<dyn Reflect> = reflected.reflect_clone().unwrap();
57    assert_eq!(cloned.downcast_ref::<Player>(), Some(&Player { id: 123 }));
58
59    // Another way we can "clone" our data is by converting it to a dynamic type.
60    // Notice here we bind it as a `dyn PartialReflect` instead of `dyn Reflect`.
61    // This is because it returns a dynamic type that simply represents the original type.
62    // In this case, because `Player` is a struct, it will return a `DynamicStruct`.
63    let dynamic: Box<dyn PartialReflect> = reflected.to_dynamic();
64    assert!(dynamic.is_dynamic());
65
66    // And if we try to convert it back to a `dyn Reflect` trait object, we'll get `None`.
67    // Dynamic types cannot be directly cast to `dyn Reflect` trait objects.
68    assert!(dynamic.try_as_reflect().is_none());
69
70    // Generally dynamic types are used to represent (or "proxy") the original type,
71    // so that we can continue to access its fields and overall structure.
72    let dynamic_ref = dynamic.reflect_ref().as_struct().unwrap();
73    let id = dynamic_ref.field("id").unwrap().try_downcast_ref::<u32>();
74    assert_eq!(id, Some(&123));
75
76    // It also enables us to create a representation of a type without having compile-time
77    // access to the actual type. This is how the reflection deserializers work.
78    // They generally can't know how to construct a type ahead of time,
79    // so they instead build and return these dynamic representations.
80    let input = "(id: 123)";
81    let mut registry = TypeRegistry::default();
82    registry.register::<Player>();
83    let registration = registry.get(std::any::TypeId::of::<Player>()).unwrap();
84    let deserialized = TypedReflectDeserializer::new(registration, &registry)
85        .deserialize(&mut ron::Deserializer::from_str(input).unwrap())
86        .unwrap();
87
88    // Our deserialized output is a `DynamicStruct` that proxies/represents a `Player`.
89    assert!(deserialized.represents::<Player>());
90
91    // And while this does allow us to access the fields and structure of the type,
92    // there may be instances where we need the actual type.
93    // For example, if we want to convert our `dyn Reflect` into a `dyn Identifiable`,
94    // we can't use the `DynamicStruct` proxy.
95    let reflect_identifiable = registration
96        .data::<ReflectIdentifiable>()
97        .expect("`ReflectIdentifiable` should be registered");
98
99    // Trying to access the registry with our `deserialized` will give a compile error
100    // since it doesn't implement `Reflect`, only `PartialReflect`.
101    // Similarly, trying to force the operation will fail.
102    // This fails since the underlying type of `deserialized` is `DynamicStruct` and not `Player`.
103    assert!(deserialized
104        .try_as_reflect()
105        .and_then(|reflect_trait_obj| reflect_identifiable.get(reflect_trait_obj))
106        .is_none());
107
108    // So how can we go from a dynamic type to a concrete type?
109    // There are two ways:
110
111    // 1. Using `PartialReflect::apply`.
112    {
113        // If you know the type at compile time, you can construct a new value and apply the dynamic
114        // value to it.
115        let mut value = Player::default();
116        value.apply(deserialized.as_ref());
117        assert_eq!(value.id, 123);
118
119        // If you don't know the type at compile time, you need a dynamic way of constructing
120        // an instance of the type. One such way is to use the `ReflectDefault` type data.
121        let reflect_default = registration
122            .data::<ReflectDefault>()
123            .expect("`ReflectDefault` should be registered");
124
125        let mut value: Box<dyn Reflect> = reflect_default.default();
126        value.apply(deserialized.as_ref());
127
128        let identifiable: &dyn Identifiable = reflect_identifiable.get(value.as_reflect()).unwrap();
129        assert_eq!(identifiable.id(), 123);
130    }
131
132    // 2. Using `FromReflect`
133    {
134        // If you know the type at compile time, you can use the `FromReflect` trait to convert the
135        // dynamic value into the concrete type directly.
136        let value: Player = Player::from_reflect(deserialized.as_ref()).unwrap();
137        assert_eq!(value.id, 123);
138
139        // If you don't know the type at compile time, you can use the `ReflectFromReflect` type data
140        // to perform the conversion dynamically.
141        let reflect_from_reflect = registration
142            .data::<ReflectFromReflect>()
143            .expect("`ReflectFromReflect` should be registered");
144
145        let value: Box<dyn Reflect> = reflect_from_reflect
146            .from_reflect(deserialized.as_ref())
147            .unwrap();
148        let identifiable: &dyn Identifiable = reflect_identifiable.get(value.as_reflect()).unwrap();
149        assert_eq!(identifiable.id(), 123);
150    }
151
152    // Lastly, while dynamic types are commonly generated via reflection methods like
153    // `PartialReflect::to_dynamic` or via the reflection deserializers,
154    // you can also construct them manually.
155    let mut my_dynamic_list = DynamicList::from_iter([1u32, 2u32, 3u32]);
156
157    // This is useful when you just need to apply some subset of changes to a type.
158    let mut my_list: Vec<u32> = Vec::new();
159    my_list.apply(&my_dynamic_list);
160    assert_eq!(my_list, vec![1, 2, 3]);
161
162    // And if you want it to actually proxy a type, you can configure it to do that as well:
163    assert!(!my_dynamic_list
164        .as_partial_reflect()
165        .represents::<Vec<u32>>());
166    my_dynamic_list.set_represented_type(Some(<Vec<u32>>::type_info()));
167    assert!(my_dynamic_list
168        .as_partial_reflect()
169        .represents::<Vec<u32>>());
170
171    // ============================= REFERENCE ============================= //
172    // For reference, here are all the available dynamic types:
173
174    // 1. `DynamicTuple`
175    {
176        let mut dynamic_tuple = DynamicTuple::default();
177        dynamic_tuple.insert(1u32);
178        dynamic_tuple.insert(2u32);
179        dynamic_tuple.insert(3u32);
180
181        let mut my_tuple: (u32, u32, u32) = (0, 0, 0);
182        my_tuple.apply(&dynamic_tuple);
183        assert_eq!(my_tuple, (1, 2, 3));
184    }
185
186    // 2. `DynamicArray`
187    {
188        let dynamic_array = DynamicArray::from_iter([1u32, 2u32, 3u32]);
189
190        let mut my_array = [0u32; 3];
191        my_array.apply(&dynamic_array);
192        assert_eq!(my_array, [1, 2, 3]);
193    }
194
195    // 3. `DynamicList`
196    {
197        let dynamic_list = DynamicList::from_iter([1u32, 2u32, 3u32]);
198
199        let mut my_list: Vec<u32> = Vec::new();
200        my_list.apply(&dynamic_list);
201        assert_eq!(my_list, vec![1, 2, 3]);
202    }
203
204    // 4. `DynamicSet`
205    {
206        let mut dynamic_set = DynamicSet::from_iter(["x", "y", "z"]);
207        assert!(dynamic_set.contains(&"x"));
208
209        dynamic_set.remove(&"y");
210
211        let mut my_set: HashSet<&str> = HashSet::default();
212        my_set.apply(&dynamic_set);
213        assert_eq!(my_set, HashSet::from_iter(["x", "z"]));
214    }
215
216    // 5. `DynamicMap`
217    {
218        let dynamic_map = DynamicMap::from_iter([("x", 1u32), ("y", 2u32), ("z", 3u32)]);
219
220        let mut my_map: HashMap<&str, u32> = HashMap::default();
221        my_map.apply(&dynamic_map);
222        assert_eq!(my_map.get("x"), Some(&1));
223        assert_eq!(my_map.get("y"), Some(&2));
224        assert_eq!(my_map.get("z"), Some(&3));
225    }
226
227    // 6. `DynamicStruct`
228    {
229        #[derive(Reflect, Default, Debug, PartialEq)]
230        struct MyStruct {
231            x: u32,
232            y: u32,
233            z: u32,
234        }
235
236        let mut dynamic_struct = DynamicStruct::default();
237        dynamic_struct.insert("x", 1u32);
238        dynamic_struct.insert("y", 2u32);
239        dynamic_struct.insert("z", 3u32);
240
241        let mut my_struct = MyStruct::default();
242        my_struct.apply(&dynamic_struct);
243        assert_eq!(my_struct, MyStruct { x: 1, y: 2, z: 3 });
244    }
245
246    // 7. `DynamicTupleStruct`
247    {
248        #[derive(Reflect, Default, Debug, PartialEq)]
249        struct MyTupleStruct(u32, u32, u32);
250
251        let mut dynamic_tuple_struct = DynamicTupleStruct::default();
252        dynamic_tuple_struct.insert(1u32);
253        dynamic_tuple_struct.insert(2u32);
254        dynamic_tuple_struct.insert(3u32);
255
256        let mut my_tuple_struct = MyTupleStruct::default();
257        my_tuple_struct.apply(&dynamic_tuple_struct);
258        assert_eq!(my_tuple_struct, MyTupleStruct(1, 2, 3));
259    }
260
261    // 8. `DynamicEnum`
262    {
263        #[derive(Reflect, Default, Debug, PartialEq)]
264        enum MyEnum {
265            #[default]
266            Empty,
267            Xyz(u32, u32, u32),
268        }
269
270        let mut values = DynamicTuple::default();
271        values.insert(1u32);
272        values.insert(2u32);
273        values.insert(3u32);
274
275        let dynamic_variant = DynamicVariant::Tuple(values);
276        let dynamic_enum = DynamicEnum::new("Xyz", dynamic_variant);
277
278        let mut my_enum = MyEnum::default();
279        my_enum.apply(&dynamic_enum);
280        assert_eq!(my_enum, MyEnum::Xyz(1, 2, 3));
281    }
282}
Source

pub fn try_downcast<T>( self: Box<dyn PartialReflect>, ) -> Result<Box<T>, Box<dyn PartialReflect>>
where T: Any,

Downcasts the value to type T, consuming the trait object.

If the underlying value does not implement Reflect or is not of type T, returns Err(self).

For remote types, T should be the type itself rather than the wrapper type.

Source

pub fn try_take<T>( self: Box<dyn PartialReflect>, ) -> Result<T, Box<dyn PartialReflect>>
where T: Any,

Downcasts the value to type T, unboxing and consuming the trait object.

If the underlying value does not implement Reflect or is not of type T, returns Err(self).

For remote types, T should be the type itself rather than the wrapper type.

Examples found in repository?
examples/reflection/function_reflection.rs (line 58)
19fn main() {
20    // There are times when it may be helpful to store a function away for later.
21    // In Rust, we can do this by storing either a function pointer or a function trait object.
22    // For example, say we wanted to store the following function:
23    fn add(left: i32, right: i32) -> i32 {
24        left + right
25    }
26
27    // We could store it as either of the following:
28    let fn_pointer: fn(i32, i32) -> i32 = add;
29    let fn_trait_object: Box<dyn Fn(i32, i32) -> i32> = Box::new(add);
30
31    // And we can call them like so:
32    let result = fn_pointer(2, 2);
33    assert_eq!(result, 4);
34    let result = fn_trait_object(2, 2);
35    assert_eq!(result, 4);
36
37    // However, you'll notice that we have to know the types of the arguments and return value at compile time.
38    // This means there's not really a way to store or call these functions dynamically at runtime.
39    // Luckily, Bevy's reflection crate comes with a set of tools for doing just that!
40    // We do this by first converting our function into the reflection-based `DynamicFunction` type
41    // using the `IntoFunction` trait.
42    let function: DynamicFunction<'static> = dbg!(add.into_function());
43
44    // This time, you'll notice that `DynamicFunction` doesn't take any information about the function's arguments or return value.
45    // This is because `DynamicFunction` checks the types of the arguments and return value at runtime.
46    // Now we can generate a list of arguments:
47    let args: ArgList = dbg!(ArgList::new().with_owned(2_i32).with_owned(2_i32));
48
49    // And finally, we can call the function.
50    // This returns a `Result` indicating whether the function was called successfully.
51    // For now, we'll just unwrap it to get our `Return` value,
52    // which is an enum containing the function's return value.
53    let return_value: Return = dbg!(function.call(args).unwrap());
54
55    // The `Return` value can be pattern matched or unwrapped to get the underlying reflection data.
56    // For the sake of brevity, we'll just unwrap it here and downcast it to the expected type of `i32`.
57    let value: Box<dyn PartialReflect> = return_value.unwrap_owned();
58    assert_eq!(value.try_take::<i32>().unwrap(), 4);
59
60    // The same can also be done for closures that capture references to their environment.
61    // Closures that capture their environment immutably can be converted into a `DynamicFunction`
62    // using the `IntoFunction` trait.
63    let minimum = 5;
64    let clamp = |value: i32| value.max(minimum);
65
66    let function: DynamicFunction = dbg!(clamp.into_function());
67    let args = dbg!(ArgList::new().with_owned(2_i32));
68    let return_value = dbg!(function.call(args).unwrap());
69    let value: Box<dyn PartialReflect> = return_value.unwrap_owned();
70    assert_eq!(value.try_take::<i32>().unwrap(), 5);
71
72    // We can also handle closures that capture their environment mutably
73    // using the `IntoFunctionMut` trait.
74    let mut count = 0;
75    let increment = |amount: i32| count += amount;
76
77    let closure: DynamicFunctionMut = dbg!(increment.into_function_mut());
78    let args = dbg!(ArgList::new().with_owned(5_i32));
79
80    // Because `DynamicFunctionMut` mutably borrows `total`,
81    // it will need to be dropped before `total` can be accessed again.
82    // This can be done manually with `drop(closure)` or by using the `DynamicFunctionMut::call_once` method.
83    dbg!(closure.call_once(args).unwrap());
84    assert_eq!(count, 5);
85
86    // Generic functions can also be converted into a `DynamicFunction`,
87    // however, they will need to be manually monomorphized first.
88    fn stringify<T: ToString>(value: T) -> String {
89        value.to_string()
90    }
91
92    // We have to manually specify the concrete generic type we want to use.
93    let function = stringify::<i32>.into_function();
94
95    let args = ArgList::new().with_owned(123_i32);
96    let return_value = function.call(args).unwrap();
97    let value: Box<dyn PartialReflect> = return_value.unwrap_owned();
98    assert_eq!(value.try_take::<String>().unwrap(), "123");
99
100    // To make things a little easier, we can also "overload" functions.
101    // This makes it so that a single `DynamicFunction` can represent multiple functions,
102    // and the correct one is chosen based on the types of the arguments.
103    // Each function overload must have a unique argument signature.
104    let function = stringify::<i32>
105        .into_function()
106        .with_overload(stringify::<f32>);
107
108    // Now our `function` accepts both `i32` and `f32` arguments.
109    let args = ArgList::new().with_owned(1.23_f32);
110    let return_value = function.call(args).unwrap();
111    let value: Box<dyn PartialReflect> = return_value.unwrap_owned();
112    assert_eq!(value.try_take::<String>().unwrap(), "1.23");
113
114    // Function overloading even allows us to have a variable number of arguments.
115    let function = (|| 0)
116        .into_function()
117        .with_overload(|a: i32| a)
118        .with_overload(|a: i32, b: i32| a + b)
119        .with_overload(|a: i32, b: i32, c: i32| a + b + c);
120
121    let args = ArgList::new()
122        .with_owned(1_i32)
123        .with_owned(2_i32)
124        .with_owned(3_i32);
125    let return_value = function.call(args).unwrap();
126    let value: Box<dyn PartialReflect> = return_value.unwrap_owned();
127    assert_eq!(value.try_take::<i32>().unwrap(), 6);
128
129    // As stated earlier, `IntoFunction` works for many kinds of simple functions.
130    // Functions with non-reflectable arguments or return values may not be able to be converted.
131    // Generic functions are also not supported (unless manually monomorphized like `foo::<i32>.into_function()`).
132    // Additionally, the lifetime of the return value is tied to the lifetime of the first argument.
133    // However, this means that many methods (i.e. functions with a `self` parameter) are also supported:
134    #[derive(Reflect, Default)]
135    struct Data {
136        value: String,
137    }
138
139    impl Data {
140        fn set_value(&mut self, value: String) {
141            self.value = value;
142        }
143
144        // Note that only `&'static str` implements `Reflect`.
145        // To get around this limitation we can use `&String` instead.
146        fn get_value(&self) -> &String {
147            &self.value
148        }
149    }
150
151    let mut data = Data::default();
152
153    let set_value = dbg!(Data::set_value.into_function());
154    let args = dbg!(ArgList::new().with_mut(&mut data)).with_owned(String::from("Hello, world!"));
155    dbg!(set_value.call(args).unwrap());
156    assert_eq!(data.value, "Hello, world!");
157
158    let get_value = dbg!(Data::get_value.into_function());
159    let args = dbg!(ArgList::new().with_ref(&data));
160    let return_value = dbg!(get_value.call(args).unwrap());
161    let value: &dyn PartialReflect = return_value.unwrap_ref();
162    assert_eq!(value.try_downcast_ref::<String>().unwrap(), "Hello, world!");
163
164    // For more complex use cases, you can always create a custom `DynamicFunction` manually.
165    // This is useful for functions that can't be converted via the `IntoFunction` trait.
166    // For example, this function doesn't implement `IntoFunction` due to the fact that
167    // the lifetime of the return value is not tied to the lifetime of the first argument.
168    fn get_or_insert(value: i32, container: &mut Option<i32>) -> &i32 {
169        if container.is_none() {
170            *container = Some(value);
171        }
172
173        container.as_ref().unwrap()
174    }
175
176    let get_or_insert_function = dbg!(DynamicFunction::new(
177        |mut args: ArgList| -> FunctionResult {
178            // The `ArgList` contains the arguments in the order they were pushed.
179            // The `DynamicFunction` will validate that the list contains
180            // exactly the number of arguments we expect.
181            // We can retrieve them out in order (note that this modifies the `ArgList`):
182            let value = args.take::<i32>()?;
183            let container = args.take::<&mut Option<i32>>()?;
184
185            // We could have also done the following to make use of type inference:
186            // let value = args.take_owned()?;
187            // let container = args.take_mut()?;
188
189            Ok(Return::Ref(get_or_insert(value, container)))
190        },
191        // Functions can be either anonymous or named.
192        // It's good practice, though, to try and name your functions whenever possible.
193        // This makes it easier to debug and is also required for function registration.
194        // We can either give it a custom name or use the function's type name as
195        // derived from `std::any::type_name_of_val`.
196        SignatureInfo::named(std::any::type_name_of_val(&get_or_insert))
197            // We can always change the name if needed.
198            // It's a good idea to also ensure that the name is unique,
199            // such as by using its type name or by prefixing it with your crate name.
200            .with_name("my_crate::get_or_insert")
201            // Since our function takes arguments, we should provide that argument information.
202            // This is used to validate arguments when calling the function.
203            // And it aids consumers of the function with their own validation and debugging.
204            // Arguments should be provided in the order they are defined in the function.
205            .with_arg::<i32>("value")
206            .with_arg::<&mut Option<i32>>("container")
207            // We can provide return information as well.
208            .with_return::<&i32>(),
209    ));
210
211    let mut container: Option<i32> = None;
212
213    let args = dbg!(ArgList::new().with_owned(5_i32).with_mut(&mut container));
214    let value = dbg!(get_or_insert_function.call(args).unwrap()).unwrap_ref();
215    assert_eq!(value.try_downcast_ref::<i32>(), Some(&5));
216
217    let args = dbg!(ArgList::new().with_owned(500_i32).with_mut(&mut container));
218    let value = dbg!(get_or_insert_function.call(args).unwrap()).unwrap_ref();
219    assert_eq!(value.try_downcast_ref::<i32>(), Some(&5));
220}
Source

pub fn try_downcast_ref<T>(&self) -> Option<&T>
where T: Any,

Downcasts the value to type T by reference.

If the underlying value does not implement Reflect or is not of type T, returns None.

For remote types, T should be the type itself rather than the wrapper type.

Examples found in repository?
examples/reflection/reflection_types.rs (line 49)
49#[reflect(Hash, PartialEq, Clone)]
50pub struct E {
51    x: usize,
52}
53
54/// By default, deriving with Reflect assumes the type is either a "struct" or an "enum".
55///
56/// You can tell reflect to treat your type instead as an "opaque type" by using the `#[reflect(opaque)]`.
57/// It is generally a good idea to implement (and reflect) the `PartialEq` and `Clone` (optionally also `Serialize` and `Deserialize`)
58/// traits on opaque types to ensure that these values behave as expected when nested in other reflected types.
59#[derive(Reflect, Copy, Clone, PartialEq, Eq, Serialize, Deserialize)]
60#[reflect(opaque)]
61#[reflect(PartialEq
More examples
Hide additional examples
examples/reflection/reflection.rs (line 78)
55fn setup(type_registry: Res<AppTypeRegistry>) {
56    let mut value = Foo {
57        a: 1,
58        _ignored: NonReflectedValue { _a: 10 },
59        nested: Bar { b: 8 },
60    };
61
62    // You can set field values like this. The type must match exactly or this will fail.
63    *value.get_field_mut("a").unwrap() = 2usize;
64    assert_eq!(value.a, 2);
65    assert_eq!(*value.get_field::<usize>("a").unwrap(), 2);
66
67    // You can also get the `&dyn PartialReflect` value of a field like this
68    let field = value.field("a").unwrap();
69
70    // But values introspected via `PartialReflect` will not return `dyn Reflect` trait objects
71    // (even if the containing type does implement `Reflect`), so we need to convert them:
72    let fully_reflected_field = field.try_as_reflect().unwrap();
73
74    // Now, you can downcast your `Reflect` value like this:
75    assert_eq!(*fully_reflected_field.downcast_ref::<usize>().unwrap(), 2);
76
77    // For this specific case, we also support the shortcut `try_downcast_ref`:
78    assert_eq!(*field.try_downcast_ref::<usize>().unwrap(), 2);
79
80    // `DynamicStruct` also implements the `Struct` and `Reflect` traits.
81    let mut patch = DynamicStruct::default();
82    patch.insert("a", 4usize);
83
84    // You can "apply" Reflect implementations on top of other Reflect implementations.
85    // This will only set fields with the same name, and it will fail if the types don't match.
86    // You can use this to "patch" your types with new values.
87    value.apply(&patch);
88    assert_eq!(value.a, 4);
89
90    let type_registry = type_registry.read();
91    // By default, all derived `Reflect` types can be Serialized using serde. No need to derive
92    // Serialize!
93    let serializer = ReflectSerializer::new(&value, &type_registry);
94    let ron_string =
95        ron::ser::to_string_pretty(&serializer, ron::ser::PrettyConfig::default()).unwrap();
96    info!("{}\n", ron_string);
97
98    // Dynamic properties can be deserialized
99    let reflect_deserializer = ReflectDeserializer::new(&type_registry);
100    let mut deserializer = ron::de::Deserializer::from_str(&ron_string).unwrap();
101    let reflect_value = reflect_deserializer.deserialize(&mut deserializer).unwrap();
102
103    // Deserializing returns a `Box<dyn PartialReflect>` value.
104    // Generally, deserializing a value will return the "dynamic" variant of a type.
105    // For example, deserializing a struct will return the DynamicStruct type.
106    // "Opaque types" will be deserialized as themselves.
107    assert_eq!(
108        reflect_value.reflect_type_path(),
109        DynamicStruct::type_path(),
110    );
111
112    // Reflect has its own `partial_eq` implementation, named `reflect_partial_eq`. This behaves
113    // like normal `partial_eq`, but it treats "dynamic" and "non-dynamic" types the same. The
114    // `Foo` struct and deserialized `DynamicStruct` are considered equal for this reason:
115    assert!(reflect_value.reflect_partial_eq(&value).unwrap());
116
117    // By "patching" `Foo` with the deserialized DynamicStruct, we can "Deserialize" Foo.
118    // This means we can serialize and deserialize with a single `Reflect` derive!
119    value.apply(&*reflect_value);
120}
examples/reflection/function_reflection.rs (line 162)
19fn main() {
20    // There are times when it may be helpful to store a function away for later.
21    // In Rust, we can do this by storing either a function pointer or a function trait object.
22    // For example, say we wanted to store the following function:
23    fn add(left: i32, right: i32) -> i32 {
24        left + right
25    }
26
27    // We could store it as either of the following:
28    let fn_pointer: fn(i32, i32) -> i32 = add;
29    let fn_trait_object: Box<dyn Fn(i32, i32) -> i32> = Box::new(add);
30
31    // And we can call them like so:
32    let result = fn_pointer(2, 2);
33    assert_eq!(result, 4);
34    let result = fn_trait_object(2, 2);
35    assert_eq!(result, 4);
36
37    // However, you'll notice that we have to know the types of the arguments and return value at compile time.
38    // This means there's not really a way to store or call these functions dynamically at runtime.
39    // Luckily, Bevy's reflection crate comes with a set of tools for doing just that!
40    // We do this by first converting our function into the reflection-based `DynamicFunction` type
41    // using the `IntoFunction` trait.
42    let function: DynamicFunction<'static> = dbg!(add.into_function());
43
44    // This time, you'll notice that `DynamicFunction` doesn't take any information about the function's arguments or return value.
45    // This is because `DynamicFunction` checks the types of the arguments and return value at runtime.
46    // Now we can generate a list of arguments:
47    let args: ArgList = dbg!(ArgList::new().with_owned(2_i32).with_owned(2_i32));
48
49    // And finally, we can call the function.
50    // This returns a `Result` indicating whether the function was called successfully.
51    // For now, we'll just unwrap it to get our `Return` value,
52    // which is an enum containing the function's return value.
53    let return_value: Return = dbg!(function.call(args).unwrap());
54
55    // The `Return` value can be pattern matched or unwrapped to get the underlying reflection data.
56    // For the sake of brevity, we'll just unwrap it here and downcast it to the expected type of `i32`.
57    let value: Box<dyn PartialReflect> = return_value.unwrap_owned();
58    assert_eq!(value.try_take::<i32>().unwrap(), 4);
59
60    // The same can also be done for closures that capture references to their environment.
61    // Closures that capture their environment immutably can be converted into a `DynamicFunction`
62    // using the `IntoFunction` trait.
63    let minimum = 5;
64    let clamp = |value: i32| value.max(minimum);
65
66    let function: DynamicFunction = dbg!(clamp.into_function());
67    let args = dbg!(ArgList::new().with_owned(2_i32));
68    let return_value = dbg!(function.call(args).unwrap());
69    let value: Box<dyn PartialReflect> = return_value.unwrap_owned();
70    assert_eq!(value.try_take::<i32>().unwrap(), 5);
71
72    // We can also handle closures that capture their environment mutably
73    // using the `IntoFunctionMut` trait.
74    let mut count = 0;
75    let increment = |amount: i32| count += amount;
76
77    let closure: DynamicFunctionMut = dbg!(increment.into_function_mut());
78    let args = dbg!(ArgList::new().with_owned(5_i32));
79
80    // Because `DynamicFunctionMut` mutably borrows `total`,
81    // it will need to be dropped before `total` can be accessed again.
82    // This can be done manually with `drop(closure)` or by using the `DynamicFunctionMut::call_once` method.
83    dbg!(closure.call_once(args).unwrap());
84    assert_eq!(count, 5);
85
86    // Generic functions can also be converted into a `DynamicFunction`,
87    // however, they will need to be manually monomorphized first.
88    fn stringify<T: ToString>(value: T) -> String {
89        value.to_string()
90    }
91
92    // We have to manually specify the concrete generic type we want to use.
93    let function = stringify::<i32>.into_function();
94
95    let args = ArgList::new().with_owned(123_i32);
96    let return_value = function.call(args).unwrap();
97    let value: Box<dyn PartialReflect> = return_value.unwrap_owned();
98    assert_eq!(value.try_take::<String>().unwrap(), "123");
99
100    // To make things a little easier, we can also "overload" functions.
101    // This makes it so that a single `DynamicFunction` can represent multiple functions,
102    // and the correct one is chosen based on the types of the arguments.
103    // Each function overload must have a unique argument signature.
104    let function = stringify::<i32>
105        .into_function()
106        .with_overload(stringify::<f32>);
107
108    // Now our `function` accepts both `i32` and `f32` arguments.
109    let args = ArgList::new().with_owned(1.23_f32);
110    let return_value = function.call(args).unwrap();
111    let value: Box<dyn PartialReflect> = return_value.unwrap_owned();
112    assert_eq!(value.try_take::<String>().unwrap(), "1.23");
113
114    // Function overloading even allows us to have a variable number of arguments.
115    let function = (|| 0)
116        .into_function()
117        .with_overload(|a: i32| a)
118        .with_overload(|a: i32, b: i32| a + b)
119        .with_overload(|a: i32, b: i32, c: i32| a + b + c);
120
121    let args = ArgList::new()
122        .with_owned(1_i32)
123        .with_owned(2_i32)
124        .with_owned(3_i32);
125    let return_value = function.call(args).unwrap();
126    let value: Box<dyn PartialReflect> = return_value.unwrap_owned();
127    assert_eq!(value.try_take::<i32>().unwrap(), 6);
128
129    // As stated earlier, `IntoFunction` works for many kinds of simple functions.
130    // Functions with non-reflectable arguments or return values may not be able to be converted.
131    // Generic functions are also not supported (unless manually monomorphized like `foo::<i32>.into_function()`).
132    // Additionally, the lifetime of the return value is tied to the lifetime of the first argument.
133    // However, this means that many methods (i.e. functions with a `self` parameter) are also supported:
134    #[derive(Reflect, Default)]
135    struct Data {
136        value: String,
137    }
138
139    impl Data {
140        fn set_value(&mut self, value: String) {
141            self.value = value;
142        }
143
144        // Note that only `&'static str` implements `Reflect`.
145        // To get around this limitation we can use `&String` instead.
146        fn get_value(&self) -> &String {
147            &self.value
148        }
149    }
150
151    let mut data = Data::default();
152
153    let set_value = dbg!(Data::set_value.into_function());
154    let args = dbg!(ArgList::new().with_mut(&mut data)).with_owned(String::from("Hello, world!"));
155    dbg!(set_value.call(args).unwrap());
156    assert_eq!(data.value, "Hello, world!");
157
158    let get_value = dbg!(Data::get_value.into_function());
159    let args = dbg!(ArgList::new().with_ref(&data));
160    let return_value = dbg!(get_value.call(args).unwrap());
161    let value: &dyn PartialReflect = return_value.unwrap_ref();
162    assert_eq!(value.try_downcast_ref::<String>().unwrap(), "Hello, world!");
163
164    // For more complex use cases, you can always create a custom `DynamicFunction` manually.
165    // This is useful for functions that can't be converted via the `IntoFunction` trait.
166    // For example, this function doesn't implement `IntoFunction` due to the fact that
167    // the lifetime of the return value is not tied to the lifetime of the first argument.
168    fn get_or_insert(value: i32, container: &mut Option<i32>) -> &i32 {
169        if container.is_none() {
170            *container = Some(value);
171        }
172
173        container.as_ref().unwrap()
174    }
175
176    let get_or_insert_function = dbg!(DynamicFunction::new(
177        |mut args: ArgList| -> FunctionResult {
178            // The `ArgList` contains the arguments in the order they were pushed.
179            // The `DynamicFunction` will validate that the list contains
180            // exactly the number of arguments we expect.
181            // We can retrieve them out in order (note that this modifies the `ArgList`):
182            let value = args.take::<i32>()?;
183            let container = args.take::<&mut Option<i32>>()?;
184
185            // We could have also done the following to make use of type inference:
186            // let value = args.take_owned()?;
187            // let container = args.take_mut()?;
188
189            Ok(Return::Ref(get_or_insert(value, container)))
190        },
191        // Functions can be either anonymous or named.
192        // It's good practice, though, to try and name your functions whenever possible.
193        // This makes it easier to debug and is also required for function registration.
194        // We can either give it a custom name or use the function's type name as
195        // derived from `std::any::type_name_of_val`.
196        SignatureInfo::named(std::any::type_name_of_val(&get_or_insert))
197            // We can always change the name if needed.
198            // It's a good idea to also ensure that the name is unique,
199            // such as by using its type name or by prefixing it with your crate name.
200            .with_name("my_crate::get_or_insert")
201            // Since our function takes arguments, we should provide that argument information.
202            // This is used to validate arguments when calling the function.
203            // And it aids consumers of the function with their own validation and debugging.
204            // Arguments should be provided in the order they are defined in the function.
205            .with_arg::<i32>("value")
206            .with_arg::<&mut Option<i32>>("container")
207            // We can provide return information as well.
208            .with_return::<&i32>(),
209    ));
210
211    let mut container: Option<i32> = None;
212
213    let args = dbg!(ArgList::new().with_owned(5_i32).with_mut(&mut container));
214    let value = dbg!(get_or_insert_function.call(args).unwrap()).unwrap_ref();
215    assert_eq!(value.try_downcast_ref::<i32>(), Some(&5));
216
217    let args = dbg!(ArgList::new().with_owned(500_i32).with_mut(&mut container));
218    let value = dbg!(get_or_insert_function.call(args).unwrap()).unwrap_ref();
219    assert_eq!(value.try_downcast_ref::<i32>(), Some(&5));
220}
examples/reflection/dynamic_types.rs (line 73)
20fn main() {
21    #[derive(Reflect, Default, PartialEq, Debug)]
22    #[reflect(Identifiable, Default)]
23    struct Player {
24        id: u32,
25    }
26
27    #[reflect_trait]
28    trait Identifiable {
29        fn id(&self) -> u32;
30    }
31
32    impl Identifiable for Player {
33        fn id(&self) -> u32 {
34            self.id
35        }
36    }
37
38    // Normally, when instantiating a type, you get back exactly that type.
39    // This is because the type is known at compile time.
40    // We call this the "concrete" or "canonical" type.
41    let player: Player = Player { id: 123 };
42
43    // When working with reflected types, however, we often "erase" this type information
44    // using the `Reflect` trait object.
45    // This trait object also gives us access to all the methods in the `PartialReflect` trait too.
46    // The underlying type is still the same (in this case, `Player`),
47    // but now we've hidden that information from the compiler.
48    let reflected: Box<dyn Reflect> = Box::new(player);
49
50    // Because it's the same type under the hood, we can still downcast it back to the original type.
51    assert!(reflected.downcast_ref::<Player>().is_some());
52
53    // We can attempt to clone our value using `PartialReflect::reflect_clone`.
54    // This will recursively call `PartialReflect::reflect_clone` on all fields of the type.
55    // Or, if we had registered `ReflectClone` using `#[reflect(Clone)]`, it would simply call `Clone::clone` directly.
56    let cloned: Box<dyn Reflect> = reflected.reflect_clone().unwrap();
57    assert_eq!(cloned.downcast_ref::<Player>(), Some(&Player { id: 123 }));
58
59    // Another way we can "clone" our data is by converting it to a dynamic type.
60    // Notice here we bind it as a `dyn PartialReflect` instead of `dyn Reflect`.
61    // This is because it returns a dynamic type that simply represents the original type.
62    // In this case, because `Player` is a struct, it will return a `DynamicStruct`.
63    let dynamic: Box<dyn PartialReflect> = reflected.to_dynamic();
64    assert!(dynamic.is_dynamic());
65
66    // And if we try to convert it back to a `dyn Reflect` trait object, we'll get `None`.
67    // Dynamic types cannot be directly cast to `dyn Reflect` trait objects.
68    assert!(dynamic.try_as_reflect().is_none());
69
70    // Generally dynamic types are used to represent (or "proxy") the original type,
71    // so that we can continue to access its fields and overall structure.
72    let dynamic_ref = dynamic.reflect_ref().as_struct().unwrap();
73    let id = dynamic_ref.field("id").unwrap().try_downcast_ref::<u32>();
74    assert_eq!(id, Some(&123));
75
76    // It also enables us to create a representation of a type without having compile-time
77    // access to the actual type. This is how the reflection deserializers work.
78    // They generally can't know how to construct a type ahead of time,
79    // so they instead build and return these dynamic representations.
80    let input = "(id: 123)";
81    let mut registry = TypeRegistry::default();
82    registry.register::<Player>();
83    let registration = registry.get(std::any::TypeId::of::<Player>()).unwrap();
84    let deserialized = TypedReflectDeserializer::new(registration, &registry)
85        .deserialize(&mut ron::Deserializer::from_str(input).unwrap())
86        .unwrap();
87
88    // Our deserialized output is a `DynamicStruct` that proxies/represents a `Player`.
89    assert!(deserialized.represents::<Player>());
90
91    // And while this does allow us to access the fields and structure of the type,
92    // there may be instances where we need the actual type.
93    // For example, if we want to convert our `dyn Reflect` into a `dyn Identifiable`,
94    // we can't use the `DynamicStruct` proxy.
95    let reflect_identifiable = registration
96        .data::<ReflectIdentifiable>()
97        .expect("`ReflectIdentifiable` should be registered");
98
99    // Trying to access the registry with our `deserialized` will give a compile error
100    // since it doesn't implement `Reflect`, only `PartialReflect`.
101    // Similarly, trying to force the operation will fail.
102    // This fails since the underlying type of `deserialized` is `DynamicStruct` and not `Player`.
103    assert!(deserialized
104        .try_as_reflect()
105        .and_then(|reflect_trait_obj| reflect_identifiable.get(reflect_trait_obj))
106        .is_none());
107
108    // So how can we go from a dynamic type to a concrete type?
109    // There are two ways:
110
111    // 1. Using `PartialReflect::apply`.
112    {
113        // If you know the type at compile time, you can construct a new value and apply the dynamic
114        // value to it.
115        let mut value = Player::default();
116        value.apply(deserialized.as_ref());
117        assert_eq!(value.id, 123);
118
119        // If you don't know the type at compile time, you need a dynamic way of constructing
120        // an instance of the type. One such way is to use the `ReflectDefault` type data.
121        let reflect_default = registration
122            .data::<ReflectDefault>()
123            .expect("`ReflectDefault` should be registered");
124
125        let mut value: Box<dyn Reflect> = reflect_default.default();
126        value.apply(deserialized.as_ref());
127
128        let identifiable: &dyn Identifiable = reflect_identifiable.get(value.as_reflect()).unwrap();
129        assert_eq!(identifiable.id(), 123);
130    }
131
132    // 2. Using `FromReflect`
133    {
134        // If you know the type at compile time, you can use the `FromReflect` trait to convert the
135        // dynamic value into the concrete type directly.
136        let value: Player = Player::from_reflect(deserialized.as_ref()).unwrap();
137        assert_eq!(value.id, 123);
138
139        // If you don't know the type at compile time, you can use the `ReflectFromReflect` type data
140        // to perform the conversion dynamically.
141        let reflect_from_reflect = registration
142            .data::<ReflectFromReflect>()
143            .expect("`ReflectFromReflect` should be registered");
144
145        let value: Box<dyn Reflect> = reflect_from_reflect
146            .from_reflect(deserialized.as_ref())
147            .unwrap();
148        let identifiable: &dyn Identifiable = reflect_identifiable.get(value.as_reflect()).unwrap();
149        assert_eq!(identifiable.id(), 123);
150    }
151
152    // Lastly, while dynamic types are commonly generated via reflection methods like
153    // `PartialReflect::to_dynamic` or via the reflection deserializers,
154    // you can also construct them manually.
155    let mut my_dynamic_list = DynamicList::from_iter([1u32, 2u32, 3u32]);
156
157    // This is useful when you just need to apply some subset of changes to a type.
158    let mut my_list: Vec<u32> = Vec::new();
159    my_list.apply(&my_dynamic_list);
160    assert_eq!(my_list, vec![1, 2, 3]);
161
162    // And if you want it to actually proxy a type, you can configure it to do that as well:
163    assert!(!my_dynamic_list
164        .as_partial_reflect()
165        .represents::<Vec<u32>>());
166    my_dynamic_list.set_represented_type(Some(<Vec<u32>>::type_info()));
167    assert!(my_dynamic_list
168        .as_partial_reflect()
169        .represents::<Vec<u32>>());
170
171    // ============================= REFERENCE ============================= //
172    // For reference, here are all the available dynamic types:
173
174    // 1. `DynamicTuple`
175    {
176        let mut dynamic_tuple = DynamicTuple::default();
177        dynamic_tuple.insert(1u32);
178        dynamic_tuple.insert(2u32);
179        dynamic_tuple.insert(3u32);
180
181        let mut my_tuple: (u32, u32, u32) = (0, 0, 0);
182        my_tuple.apply(&dynamic_tuple);
183        assert_eq!(my_tuple, (1, 2, 3));
184    }
185
186    // 2. `DynamicArray`
187    {
188        let dynamic_array = DynamicArray::from_iter([1u32, 2u32, 3u32]);
189
190        let mut my_array = [0u32; 3];
191        my_array.apply(&dynamic_array);
192        assert_eq!(my_array, [1, 2, 3]);
193    }
194
195    // 3. `DynamicList`
196    {
197        let dynamic_list = DynamicList::from_iter([1u32, 2u32, 3u32]);
198
199        let mut my_list: Vec<u32> = Vec::new();
200        my_list.apply(&dynamic_list);
201        assert_eq!(my_list, vec![1, 2, 3]);
202    }
203
204    // 4. `DynamicSet`
205    {
206        let mut dynamic_set = DynamicSet::from_iter(["x", "y", "z"]);
207        assert!(dynamic_set.contains(&"x"));
208
209        dynamic_set.remove(&"y");
210
211        let mut my_set: HashSet<&str> = HashSet::default();
212        my_set.apply(&dynamic_set);
213        assert_eq!(my_set, HashSet::from_iter(["x", "z"]));
214    }
215
216    // 5. `DynamicMap`
217    {
218        let dynamic_map = DynamicMap::from_iter([("x", 1u32), ("y", 2u32), ("z", 3u32)]);
219
220        let mut my_map: HashMap<&str, u32> = HashMap::default();
221        my_map.apply(&dynamic_map);
222        assert_eq!(my_map.get("x"), Some(&1));
223        assert_eq!(my_map.get("y"), Some(&2));
224        assert_eq!(my_map.get("z"), Some(&3));
225    }
226
227    // 6. `DynamicStruct`
228    {
229        #[derive(Reflect, Default, Debug, PartialEq)]
230        struct MyStruct {
231            x: u32,
232            y: u32,
233            z: u32,
234        }
235
236        let mut dynamic_struct = DynamicStruct::default();
237        dynamic_struct.insert("x", 1u32);
238        dynamic_struct.insert("y", 2u32);
239        dynamic_struct.insert("z", 3u32);
240
241        let mut my_struct = MyStruct::default();
242        my_struct.apply(&dynamic_struct);
243        assert_eq!(my_struct, MyStruct { x: 1, y: 2, z: 3 });
244    }
245
246    // 7. `DynamicTupleStruct`
247    {
248        #[derive(Reflect, Default, Debug, PartialEq)]
249        struct MyTupleStruct(u32, u32, u32);
250
251        let mut dynamic_tuple_struct = DynamicTupleStruct::default();
252        dynamic_tuple_struct.insert(1u32);
253        dynamic_tuple_struct.insert(2u32);
254        dynamic_tuple_struct.insert(3u32);
255
256        let mut my_tuple_struct = MyTupleStruct::default();
257        my_tuple_struct.apply(&dynamic_tuple_struct);
258        assert_eq!(my_tuple_struct, MyTupleStruct(1, 2, 3));
259    }
260
261    // 8. `DynamicEnum`
262    {
263        #[derive(Reflect, Default, Debug, PartialEq)]
264        enum MyEnum {
265            #[default]
266            Empty,
267            Xyz(u32, u32, u32),
268        }
269
270        let mut values = DynamicTuple::default();
271        values.insert(1u32);
272        values.insert(2u32);
273        values.insert(3u32);
274
275        let dynamic_variant = DynamicVariant::Tuple(values);
276        let dynamic_enum = DynamicEnum::new("Xyz", dynamic_variant);
277
278        let mut my_enum = MyEnum::default();
279        my_enum.apply(&dynamic_enum);
280        assert_eq!(my_enum, MyEnum::Xyz(1, 2, 3));
281    }
282}
Source

pub fn try_downcast_mut<T>(&mut self) -> Option<&mut T>
where T: Any,

Downcasts the value to type T by mutable reference.

If the underlying value does not implement Reflect or is not of type T, returns None.

For remote types, T should be the type itself rather than the wrapper type.

Trait Implementations§

Source§

impl Debug for dyn PartialReflect

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl FromIterator<Box<dyn PartialReflect>> for DynamicArray

Source§

fn from_iter<I>(values: I) -> DynamicArray
where I: IntoIterator<Item = Box<dyn PartialReflect>>,

Creates a value from an iterator. Read more
Source§

impl FromIterator<Box<dyn PartialReflect>> for DynamicList

Source§

fn from_iter<I>(values: I) -> DynamicList
where I: IntoIterator<Item = Box<dyn PartialReflect>>,

Creates a value from an iterator. Read more
Source§

impl FromIterator<Box<dyn PartialReflect>> for DynamicSet

Source§

fn from_iter<I>(values: I) -> DynamicSet
where I: IntoIterator<Item = Box<dyn PartialReflect>>,

Creates a value from an iterator. Read more
Source§

impl FromIterator<Box<dyn PartialReflect>> for DynamicTuple

Source§

fn from_iter<I>(fields: I) -> DynamicTuple
where I: IntoIterator<Item = Box<dyn PartialReflect>>,

Creates a value from an iterator. Read more
Source§

impl FromIterator<Box<dyn PartialReflect>> for DynamicTupleStruct

Source§

fn from_iter<I>(fields: I) -> DynamicTupleStruct
where I: IntoIterator<Item = Box<dyn PartialReflect>>,

Creates a value from an iterator. Read more
Source§

impl TypePath for dyn PartialReflect

Source§

fn type_path() -> &'static str

Returns the fully qualified path of the underlying type. Read more
Source§

fn short_type_path() -> &'static str

Returns a short, pretty-print enabled path to the type. Read more
Source§

fn type_ident() -> Option<&'static str>

Returns the name of the type, or None if it is anonymous. Read more
Source§

fn crate_name() -> Option<&'static str>

Returns the name of the crate the type is in, or None if it is anonymous. Read more
Source§

fn module_path() -> Option<&'static str>

Returns the path to the module the type is in, or None if it is anonymous. Read more

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl PartialReflect for &'static Location<'static>

Source§

fn get_represented_type_info(&self) -> Option<&'static TypeInfo>

Source§

fn into_partial_reflect( self: Box<&'static Location<'static>>, ) -> Box<dyn PartialReflect>

Source§

fn as_partial_reflect(&self) -> &(dyn PartialReflect + 'static)

Source§

fn as_partial_reflect_mut(&mut self) -> &mut (dyn PartialReflect + 'static)

Source§

fn try_into_reflect( self: Box<&'static Location<'static>>, ) -> Result<Box<dyn Reflect>, Box<dyn PartialReflect>>

Source§

fn try_as_reflect(&self) -> Option<&(dyn Reflect + 'static)>

Source§

fn try_as_reflect_mut(&mut self) -> Option<&mut (dyn Reflect + 'static)>

Source§

fn reflect_kind(&self) -> ReflectKind

Source§

fn reflect_ref(&self) -> ReflectRef<'_>

Source§

fn reflect_mut(&mut self) -> ReflectMut<'_>

Source§

fn reflect_owned(self: Box<&'static Location<'static>>) -> ReflectOwned

Source§

fn reflect_clone(&self) -> Result<Box<dyn Reflect>, ReflectCloneError>

Source§

fn reflect_hash(&self) -> Option<u64>

Source§

fn reflect_partial_eq( &self, value: &(dyn PartialReflect + 'static), ) -> Option<bool>

Source§

fn reflect_partial_cmp( &self, value: &(dyn PartialReflect + 'static), ) -> Option<Ordering>

Source§

fn try_apply( &mut self, value: &(dyn PartialReflect + 'static), ) -> Result<(), ApplyError>

Source§

impl PartialReflect for &'static Path

Source§

fn get_represented_type_info(&self) -> Option<&'static TypeInfo>

Source§

fn into_partial_reflect(self: Box<&'static Path>) -> Box<dyn PartialReflect>

Source§

fn as_partial_reflect(&self) -> &(dyn PartialReflect + 'static)

Source§

fn as_partial_reflect_mut(&mut self) -> &mut (dyn PartialReflect + 'static)

Source§

fn try_into_reflect( self: Box<&'static Path>, ) -> Result<Box<dyn Reflect>, Box<dyn PartialReflect>>

Source§

fn try_as_reflect(&self) -> Option<&(dyn Reflect + 'static)>

Source§

fn try_as_reflect_mut(&mut self) -> Option<&mut (dyn Reflect + 'static)>

Source§

fn reflect_kind(&self) -> ReflectKind

Source§

fn reflect_ref(&self) -> ReflectRef<'_>

Source§

fn reflect_mut(&mut self) -> ReflectMut<'_>

Source§

fn reflect_owned(self: Box<&'static Path>) -> ReflectOwned

Source§

fn reflect_clone(&self) -> Result<Box<dyn Reflect>, ReflectCloneError>

Source§

fn reflect_hash(&self) -> Option<u64>

Source§

fn reflect_partial_eq( &self, value: &(dyn PartialReflect + 'static), ) -> Option<bool>

Source§

fn reflect_partial_cmp( &self, value: &(dyn PartialReflect + 'static), ) -> Option<Ordering>

Source§

fn try_apply( &mut self, value: &(dyn PartialReflect + 'static), ) -> Result<(), ApplyError>

Source§

impl PartialReflect for &'static str

Source§

fn get_represented_type_info(&self) -> Option<&'static TypeInfo>

Source§

fn into_partial_reflect(self: Box<&'static str>) -> Box<dyn PartialReflect>

Source§

fn as_partial_reflect(&self) -> &(dyn PartialReflect + 'static)

Source§

fn as_partial_reflect_mut(&mut self) -> &mut (dyn PartialReflect + 'static)

Source§

fn try_into_reflect( self: Box<&'static str>, ) -> Result<Box<dyn Reflect>, Box<dyn PartialReflect>>

Source§

fn try_as_reflect(&self) -> Option<&(dyn Reflect + 'static)>

Source§

fn try_as_reflect_mut(&mut self) -> Option<&mut (dyn Reflect + 'static)>

Source§

fn reflect_ref(&self) -> ReflectRef<'_>

Source§

fn reflect_mut(&mut self) -> ReflectMut<'_>

Source§

fn reflect_owned(self: Box<&'static str>) -> ReflectOwned

Source§

fn reflect_clone(&self) -> Result<Box<dyn Reflect>, ReflectCloneError>

Source§

fn reflect_hash(&self) -> Option<u64>

Source§

fn reflect_partial_eq( &self, value: &(dyn PartialReflect + 'static), ) -> Option<bool>

Source§

fn reflect_partial_cmp( &self, value: &(dyn PartialReflect + 'static), ) -> Option<Ordering>

Source§

fn debug(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Source§

fn try_apply( &mut self, value: &(dyn PartialReflect + 'static), ) -> Result<(), ApplyError>

Source§

impl PartialReflect for ()

Source§

fn get_represented_type_info(&self) -> Option<&'static TypeInfo>

Source§

fn into_partial_reflect(self: Box<()>) -> Box<dyn PartialReflect>

Source§

fn as_partial_reflect(&self) -> &(dyn PartialReflect + 'static)

Source§

fn as_partial_reflect_mut(&mut self) -> &mut (dyn PartialReflect + 'static)

Source§

fn try_into_reflect( self: Box<()>, ) -> Result<Box<dyn Reflect>, Box<dyn PartialReflect>>

Source§

fn try_as_reflect(&self) -> Option<&(dyn Reflect + 'static)>

Source§

fn try_as_reflect_mut(&mut self) -> Option<&mut (dyn Reflect + 'static)>

Source§

fn reflect_kind(&self) -> ReflectKind

Source§

fn reflect_ref(&self) -> ReflectRef<'_>

Source§

fn reflect_mut(&mut self) -> ReflectMut<'_>

Source§

fn reflect_owned(self: Box<()>) -> ReflectOwned

Source§

fn reflect_partial_eq( &self, value: &(dyn PartialReflect + 'static), ) -> Option<bool>

Source§

fn reflect_partial_cmp( &self, value: &(dyn PartialReflect + 'static), ) -> Option<Ordering>

Source§

fn apply(&mut self, value: &(dyn PartialReflect + 'static))

Source§

fn try_apply( &mut self, value: &(dyn PartialReflect + 'static), ) -> Result<(), ApplyError>

Source§

fn reflect_clone(&self) -> Result<Box<dyn Reflect>, ReflectCloneError>

Source§

impl PartialReflect for Atomic<bool>

Source§

fn get_represented_type_info(&self) -> Option<&'static TypeInfo>

Source§

fn into_partial_reflect(self: Box<Atomic<bool>>) -> Box<dyn PartialReflect>

Source§

fn as_partial_reflect(&self) -> &(dyn PartialReflect + 'static)

Source§

fn as_partial_reflect_mut(&mut self) -> &mut (dyn PartialReflect + 'static)

Source§

fn try_into_reflect( self: Box<Atomic<bool>>, ) -> Result<Box<dyn Reflect>, Box<dyn PartialReflect>>

Source§

fn try_as_reflect(&self) -> Option<&(dyn Reflect + 'static)>

Source§

fn try_as_reflect_mut(&mut self) -> Option<&mut (dyn Reflect + 'static)>

Source§

fn reflect_clone(&self) -> Result<Box<dyn Reflect>, ReflectCloneError>

Source§

fn try_apply( &mut self, value: &(dyn PartialReflect + 'static), ) -> Result<(), ApplyError>

Source§

fn reflect_kind(&self) -> ReflectKind

Source§

fn reflect_ref(&self) -> ReflectRef<'_>

Source§

fn reflect_mut(&mut self) -> ReflectMut<'_>

Source§

fn reflect_owned(self: Box<Atomic<bool>>) -> ReflectOwned

Source§

fn debug(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Source§

impl PartialReflect for Atomic<i8>

Source§

fn get_represented_type_info(&self) -> Option<&'static TypeInfo>

Source§

fn into_partial_reflect(self: Box<Atomic<i8>>) -> Box<dyn PartialReflect>

Source§

fn as_partial_reflect(&self) -> &(dyn PartialReflect + 'static)

Source§

fn as_partial_reflect_mut(&mut self) -> &mut (dyn PartialReflect + 'static)

Source§

fn try_into_reflect( self: Box<Atomic<i8>>, ) -> Result<Box<dyn Reflect>, Box<dyn PartialReflect>>

Source§

fn try_as_reflect(&self) -> Option<&(dyn Reflect + 'static)>

Source§

fn try_as_reflect_mut(&mut self) -> Option<&mut (dyn Reflect + 'static)>

Source§

fn reflect_clone(&self) -> Result<Box<dyn Reflect>, ReflectCloneError>

Source§

fn try_apply( &mut self, value: &(dyn PartialReflect + 'static), ) -> Result<(), ApplyError>

Source§

fn reflect_kind(&self) -> ReflectKind

Source§

fn reflect_ref(&self) -> ReflectRef<'_>

Source§

fn reflect_mut(&mut self) -> ReflectMut<'_>

Source§

fn reflect_owned(self: Box<Atomic<i8>>) -> ReflectOwned

Source§

fn debug(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Source§

impl PartialReflect for Atomic<i16>

Source§

fn get_represented_type_info(&self) -> Option<&'static TypeInfo>

Source§

fn into_partial_reflect(self: Box<Atomic<i16>>) -> Box<dyn PartialReflect>

Source§

fn as_partial_reflect(&self) -> &(dyn PartialReflect + 'static)

Source§

fn as_partial_reflect_mut(&mut self) -> &mut (dyn PartialReflect + 'static)

Source§

fn try_into_reflect( self: Box<Atomic<i16>>, ) -> Result<Box<dyn Reflect>, Box<dyn PartialReflect>>

Source§

fn try_as_reflect(&self) -> Option<&(dyn Reflect + 'static)>

Source§

fn try_as_reflect_mut(&mut self) -> Option<&mut (dyn Reflect + 'static)>

Source§

fn reflect_clone(&self) -> Result<Box<dyn Reflect>, ReflectCloneError>

Source§

fn try_apply( &mut self, value: &(dyn PartialReflect + 'static), ) -> Result<(), ApplyError>

Source§

fn reflect_kind(&self) -> ReflectKind

Source§

fn reflect_ref(&self) -> ReflectRef<'_>

Source§

fn reflect_mut(&mut self) -> ReflectMut<'_>

Source§

fn reflect_owned(self: Box<Atomic<i16>>) -> ReflectOwned

Source§

fn debug(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Source§

impl PartialReflect for Atomic<i32>

Source§

fn get_represented_type_info(&self) -> Option<&'static TypeInfo>

Source§

fn into_partial_reflect(self: Box<Atomic<i32>>) -> Box<dyn PartialReflect>

Source§

fn as_partial_reflect(&self) -> &(dyn PartialReflect + 'static)

Source§

fn as_partial_reflect_mut(&mut self) -> &mut (dyn PartialReflect + 'static)

Source§

fn try_into_reflect( self: Box<Atomic<i32>>, ) -> Result<Box<dyn Reflect>, Box<dyn PartialReflect>>

Source§

fn try_as_reflect(&self) -> Option<&(dyn Reflect + 'static)>

Source§

fn try_as_reflect_mut(&mut self) -> Option<&mut (dyn Reflect + 'static)>

Source§

fn reflect_clone(&self) -> Result<Box<dyn Reflect>, ReflectCloneError>

Source§

fn try_apply( &mut self, value: &(dyn PartialReflect + 'static), ) -> Result<(), ApplyError>

Source§

fn reflect_kind(&self) -> ReflectKind

Source§

fn reflect_ref(&self) -> ReflectRef<'_>

Source§

fn reflect_mut(&mut self) -> ReflectMut<'_>

Source§

fn reflect_owned(self: Box<Atomic<i32>>) -> ReflectOwned

Source§

fn debug(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Source§

impl PartialReflect for Atomic<i64>

Source§

fn get_represented_type_info(&self) -> Option<&'static TypeInfo>

Source§

fn into_partial_reflect(self: Box<Atomic<i64>>) -> Box<dyn PartialReflect>

Source§

fn as_partial_reflect(&self) -> &(dyn PartialReflect + 'static)

Source§

fn as_partial_reflect_mut(&mut self) -> &mut (dyn PartialReflect + 'static)

Source§

fn try_into_reflect( self: Box<Atomic<i64>>, ) -> Result<Box<dyn Reflect>, Box<dyn PartialReflect>>

Source§

fn try_as_reflect(&self) -> Option<&(dyn Reflect + 'static)>

Source§

fn try_as_reflect_mut(&mut self) -> Option<&mut (dyn Reflect + 'static)>

Source§

fn reflect_clone(&self) -> Result<Box<dyn Reflect>, ReflectCloneError>

Source§

fn try_apply( &mut self, value: &(dyn PartialReflect + 'static), ) -> Result<(), ApplyError>

Source§

fn reflect_kind(&self) -> ReflectKind

Source§

fn reflect_ref(&self) -> ReflectRef<'_>

Source§

fn reflect_mut(&mut self) -> ReflectMut<'_>

Source§

fn reflect_owned(self: Box<Atomic<i64>>) -> ReflectOwned

Source§

fn debug(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Source§

impl PartialReflect for Atomic<isize>

Source§

fn get_represented_type_info(&self) -> Option<&'static TypeInfo>

Source§

fn into_partial_reflect(self: Box<Atomic<isize>>) -> Box<dyn PartialReflect>

Source§

fn as_partial_reflect(&self) -> &(dyn PartialReflect + 'static)

Source§

fn as_partial_reflect_mut(&mut self) -> &mut (dyn PartialReflect + 'static)

Source§

fn try_into_reflect( self: Box<Atomic<isize>>, ) -> Result<Box<dyn Reflect>, Box<dyn PartialReflect>>

Source§

fn try_as_reflect(&self) -> Option<&(dyn Reflect + 'static)>

Source§

fn try_as_reflect_mut(&mut self) -> Option<&mut (dyn Reflect + 'static)>

Source§

fn reflect_clone(&self) -> Result<Box<dyn Reflect>, ReflectCloneError>

Source§

fn try_apply( &mut self, value: &(dyn PartialReflect + 'static), ) -> Result<(), ApplyError>

Source§

fn reflect_kind(&self) -> ReflectKind

Source§

fn reflect_ref(&self) -> ReflectRef<'_>

Source§

fn reflect_mut(&mut self) -> ReflectMut<'_>

Source§

fn reflect_owned(self: Box<Atomic<isize>>) -> ReflectOwned

Source§

fn debug(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Source§

impl PartialReflect for Atomic<u8>

Source§

fn get_represented_type_info(&self) -> Option<&'static TypeInfo>

Source§

fn into_partial_reflect(self: Box<Atomic<u8>>) -> Box<dyn PartialReflect>

Source§

fn as_partial_reflect(&self) -> &(dyn PartialReflect + 'static)

Source§

fn as_partial_reflect_mut(&mut self) -> &mut (dyn PartialReflect + 'static)

Source§

fn try_into_reflect( self: Box<Atomic<u8>>, ) -> Result<Box<dyn Reflect>, Box<dyn PartialReflect>>

Source§

fn try_as_reflect(&self) -> Option<&(dyn Reflect + 'static)>

Source§

fn try_as_reflect_mut(&mut self) -> Option<&mut (dyn Reflect + 'static)>

Source§

fn reflect_clone(&self) -> Result<Box<dyn Reflect>, ReflectCloneError>

Source§

fn try_apply( &mut self, value: &(dyn PartialReflect + 'static), ) -> Result<(), ApplyError>

Source§

fn reflect_kind(&self) -> ReflectKind

Source§

fn reflect_ref(&self) -> ReflectRef<'_>

Source§

fn reflect_mut(&mut self) -> ReflectMut<'_>

Source§

fn reflect_owned(self: Box<Atomic<u8>>) -> ReflectOwned

Source§

fn debug(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Source§

impl PartialReflect for Atomic<u16>

Source§

fn get_represented_type_info(&self) -> Option<&'static TypeInfo>

Source§

fn into_partial_reflect(self: Box<Atomic<u16>>) -> Box<dyn PartialReflect>

Source§

fn as_partial_reflect(&self) -> &(dyn PartialReflect + 'static)

Source§

fn as_partial_reflect_mut(&mut self) -> &mut (dyn PartialReflect + 'static)

Source§

fn try_into_reflect( self: Box<Atomic<u16>>, ) -> Result<Box<dyn Reflect>, Box<dyn PartialReflect>>

Source§

fn try_as_reflect(&self) -> Option<&(dyn Reflect + 'static)>

Source§

fn try_as_reflect_mut(&mut self) -> Option<&mut (dyn Reflect + 'static)>

Source§

fn reflect_clone(&self) -> Result<Box<dyn Reflect>, ReflectCloneError>

Source§

fn try_apply( &mut self, value: &(dyn PartialReflect + 'static), ) -> Result<(), ApplyError>

Source§

fn reflect_kind(&self) -> ReflectKind

Source§

fn reflect_ref(&self) -> ReflectRef<'_>

Source§

fn reflect_mut(&mut self) -> ReflectMut<'_>

Source§

fn reflect_owned(self: Box<Atomic<u16>>) -> ReflectOwned

Source§

fn debug(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Source§

impl PartialReflect for Atomic<u32>

Source§

fn get_represented_type_info(&self) -> Option<&'static TypeInfo>

Source§

fn into_partial_reflect(self: Box<Atomic<u32>>) -> Box<dyn PartialReflect>

Source§

fn as_partial_reflect(&self) -> &(dyn PartialReflect + 'static)

Source§

fn as_partial_reflect_mut(&mut self) -> &mut (dyn PartialReflect + 'static)

Source§

fn try_into_reflect( self: Box<Atomic<u32>>, ) -> Result<Box<dyn Reflect>, Box<dyn PartialReflect>>

Source§

fn try_as_reflect(&self) -> Option<&(dyn Reflect + 'static)>

Source§

fn try_as_reflect_mut(&mut self) -> Option<&mut (dyn Reflect + 'static)>

Source§

fn reflect_clone(&self) -> Result<Box<dyn Reflect>, ReflectCloneError>

Source§

fn try_apply( &mut self, value: &(dyn PartialReflect + 'static), ) -> Result<(), ApplyError>

Source§

fn reflect_kind(&self) -> ReflectKind

Source§

fn reflect_ref(&self) -> ReflectRef<'_>

Source§

fn reflect_mut(&mut self) -> ReflectMut<'_>

Source§

fn reflect_owned(self: Box<Atomic<u32>>) -> ReflectOwned

Source§

fn debug(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Source§

impl PartialReflect for Atomic<u64>

Source§

fn get_represented_type_info(&self) -> Option<&'static TypeInfo>

Source§

fn into_partial_reflect(self: Box<Atomic<u64>>) -> Box<dyn PartialReflect>

Source§

fn as_partial_reflect(&self) -> &(dyn PartialReflect + 'static)

Source§

fn as_partial_reflect_mut(&mut self) -> &mut (dyn PartialReflect + 'static)

Source§

fn try_into_reflect( self: Box<Atomic<u64>>, ) -> Result<Box<dyn Reflect>, Box<dyn PartialReflect>>

Source§

fn try_as_reflect(&self) -> Option<&(dyn Reflect + 'static)>

Source§

fn try_as_reflect_mut(&mut self) -> Option<&mut (dyn Reflect + 'static)>

Source§

fn reflect_clone(&self) -> Result<Box<dyn Reflect>, ReflectCloneError>

Source§

fn try_apply( &mut self, value: &(dyn PartialReflect + 'static), ) -> Result<(), ApplyError>

Source§

fn reflect_kind(&self) -> ReflectKind

Source§

fn reflect_ref(&self) -> ReflectRef<'_>

Source§

fn reflect_mut(&mut self) -> ReflectMut<'_>

Source§

fn reflect_owned(self: Box<Atomic<u64>>) -> ReflectOwned

Source§

fn debug(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Source§

impl PartialReflect for Atomic<usize>

Source§

fn get_represented_type_info(&self) -> Option<&'static TypeInfo>

Source§

fn into_partial_reflect(self: Box<Atomic<usize>>) -> Box<dyn PartialReflect>

Source§

fn as_partial_reflect(&self) -> &(dyn PartialReflect + 'static)

Source§

fn as_partial_reflect_mut(&mut self) -> &mut (dyn PartialReflect + 'static)

Source§

fn try_into_reflect( self: Box<Atomic<usize>>, ) -> Result<Box<dyn Reflect>, Box<dyn PartialReflect>>

Source§

fn try_as_reflect(&self) -> Option<&(dyn Reflect + 'static)>

Source§

fn try_as_reflect_mut(&mut self) -> Option<&mut (dyn Reflect + 'static)>

Source§

fn reflect_clone(&self) -> Result<Box<dyn Reflect>, ReflectCloneError>

Source§

fn try_apply( &mut self, value: &(dyn PartialReflect + 'static), ) -> Result<(), ApplyError>

Source§

fn reflect_kind(&self) -> ReflectKind

Source§

fn reflect_ref(&self) -> ReflectRef<'_>

Source§

fn reflect_mut(&mut self) -> ReflectMut<'_>

Source§

fn reflect_owned(self: Box<Atomic<usize>>) -> ReflectOwned

Source§

fn debug(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Source§

impl PartialReflect for Cow<'static, Path>

Source§

fn get_represented_type_info(&self) -> Option<&'static TypeInfo>

Source§

fn into_partial_reflect( self: Box<Cow<'static, Path>>, ) -> Box<dyn PartialReflect>

Source§

fn as_partial_reflect(&self) -> &(dyn PartialReflect + 'static)

Source§

fn as_partial_reflect_mut(&mut self) -> &mut (dyn PartialReflect + 'static)

Source§

fn try_into_reflect( self: Box<Cow<'static, Path>>, ) -> Result<Box<dyn Reflect>, Box<dyn PartialReflect>>

Source§

fn try_as_reflect(&self) -> Option<&(dyn Reflect + 'static)>

Source§

fn try_as_reflect_mut(&mut self) -> Option<&mut (dyn Reflect + 'static)>

Source§

fn reflect_kind(&self) -> ReflectKind

Source§

fn reflect_ref(&self) -> ReflectRef<'_>

Source§

fn reflect_mut(&mut self) -> ReflectMut<'_>

Source§

fn reflect_owned(self: Box<Cow<'static, Path>>) -> ReflectOwned

Source§

fn reflect_clone(&self) -> Result<Box<dyn Reflect>, ReflectCloneError>

Source§

fn reflect_hash(&self) -> Option<u64>

Source§

fn reflect_partial_eq( &self, value: &(dyn PartialReflect + 'static), ) -> Option<bool>

Source§

fn reflect_partial_cmp( &self, value: &(dyn PartialReflect + 'static), ) -> Option<Ordering>

Source§

fn debug(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Source§

fn try_apply( &mut self, value: &(dyn PartialReflect + 'static), ) -> Result<(), ApplyError>

Source§

impl PartialReflect for Cow<'static, str>

Source§

fn get_represented_type_info(&self) -> Option<&'static TypeInfo>

Source§

fn into_partial_reflect(self: Box<Cow<'static, str>>) -> Box<dyn PartialReflect>

Source§

fn as_partial_reflect(&self) -> &(dyn PartialReflect + 'static)

Source§

fn as_partial_reflect_mut(&mut self) -> &mut (dyn PartialReflect + 'static)

Source§

fn try_into_reflect( self: Box<Cow<'static, str>>, ) -> Result<Box<dyn Reflect>, Box<dyn PartialReflect>>

Source§

fn try_as_reflect(&self) -> Option<&(dyn Reflect + 'static)>

Source§

fn try_as_reflect_mut(&mut self) -> Option<&mut (dyn Reflect + 'static)>

Source§

fn reflect_kind(&self) -> ReflectKind

Source§

fn reflect_ref(&self) -> ReflectRef<'_>

Source§

fn reflect_mut(&mut self) -> ReflectMut<'_>

Source§

fn reflect_owned(self: Box<Cow<'static, str>>) -> ReflectOwned

Source§

fn reflect_clone(&self) -> Result<Box<dyn Reflect>, ReflectCloneError>

Source§

fn reflect_hash(&self) -> Option<u64>

Source§

fn reflect_partial_eq( &self, value: &(dyn PartialReflect + 'static), ) -> Option<bool>

Source§

fn reflect_partial_cmp( &self, value: &(dyn PartialReflect + 'static), ) -> Option<Ordering>

Source§

fn debug(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Source§

fn try_apply( &mut self, value: &(dyn PartialReflect + 'static), ) -> Result<(), ApplyError>

Source§

impl PartialReflect for Duration

Source§

fn get_represented_type_info(&self) -> Option<&'static TypeInfo>

Source§

fn to_dynamic(&self) -> Box<dyn PartialReflect>

Source§

fn try_apply( &mut self, value: &(dyn PartialReflect + 'static), ) -> Result<(), ApplyError>

Source§

fn reflect_kind(&self) -> ReflectKind

Source§

fn reflect_ref(&self) -> ReflectRef<'_>

Source§

fn reflect_mut(&mut self) -> ReflectMut<'_>

Source§

fn reflect_owned(self: Box<Duration>) -> ReflectOwned

Source§

fn try_into_reflect( self: Box<Duration>, ) -> Result<Box<dyn Reflect>, Box<dyn PartialReflect>>

Source§

fn try_as_reflect(&self) -> Option<&(dyn Reflect + 'static)>

Source§

fn try_as_reflect_mut(&mut self) -> Option<&mut (dyn Reflect + 'static)>

Source§

fn into_partial_reflect(self: Box<Duration>) -> Box<dyn PartialReflect>

Source§

fn as_partial_reflect(&self) -> &(dyn PartialReflect + 'static)

Source§

fn as_partial_reflect_mut(&mut self) -> &mut (dyn PartialReflect + 'static)

Source§

fn reflect_hash(&self) -> Option<u64>

Source§

fn reflect_partial_eq( &self, value: &(dyn PartialReflect + 'static), ) -> Option<bool>

Source§

fn reflect_partial_cmp( &self, value: &(dyn PartialReflect + 'static), ) -> Option<Ordering>

Source§

fn debug(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Source§

fn reflect_clone(&self) -> Result<Box<dyn Reflect>, ReflectCloneError>

Source§

impl PartialReflect for NodeIndex

Source§

fn get_represented_type_info(&self) -> Option<&'static TypeInfo>

Source§

fn to_dynamic(&self) -> Box<dyn PartialReflect>

Source§

fn try_apply( &mut self, value: &(dyn PartialReflect + 'static), ) -> Result<(), ApplyError>

Source§

fn reflect_kind(&self) -> ReflectKind

Source§

fn reflect_ref(&self) -> ReflectRef<'_>

Source§

fn reflect_mut(&mut self) -> ReflectMut<'_>

Source§

fn reflect_owned(self: Box<NodeIndex>) -> ReflectOwned

Source§

fn try_into_reflect( self: Box<NodeIndex>, ) -> Result<Box<dyn Reflect>, Box<dyn PartialReflect>>

Source§

fn try_as_reflect(&self) -> Option<&(dyn Reflect + 'static)>

Source§

fn try_as_reflect_mut(&mut self) -> Option<&mut (dyn Reflect + 'static)>

Source§

fn into_partial_reflect(self: Box<NodeIndex>) -> Box<dyn PartialReflect>

Source§

fn as_partial_reflect(&self) -> &(dyn PartialReflect + 'static)

Source§

fn as_partial_reflect_mut(&mut self) -> &mut (dyn PartialReflect + 'static)

Source§

fn reflect_hash(&self) -> Option<u64>

Source§

fn reflect_partial_eq( &self, value: &(dyn PartialReflect + 'static), ) -> Option<bool>

Source§

fn reflect_partial_cmp( &self, value: &(dyn PartialReflect + 'static), ) -> Option<Ordering>

Source§

fn reflect_clone(&self) -> Result<Box<dyn Reflect>, ReflectCloneError>

Source§

impl PartialReflect for NonZero<i8>

Source§

fn get_represented_type_info(&self) -> Option<&'static TypeInfo>

Source§

fn to_dynamic(&self) -> Box<dyn PartialReflect>

Source§

fn try_apply( &mut self, value: &(dyn PartialReflect + 'static), ) -> Result<(), ApplyError>

Source§

fn reflect_kind(&self) -> ReflectKind

Source§

fn reflect_ref(&self) -> ReflectRef<'_>

Source§

fn reflect_mut(&mut self) -> ReflectMut<'_>

Source§

fn reflect_owned(self: Box<NonZero<i8>>) -> ReflectOwned

Source§

fn try_into_reflect( self: Box<NonZero<i8>>, ) -> Result<Box<dyn Reflect>, Box<dyn PartialReflect>>

Source§

fn try_as_reflect(&self) -> Option<&(dyn Reflect + 'static)>

Source§

fn try_as_reflect_mut(&mut self) -> Option<&mut (dyn Reflect + 'static)>

Source§

fn into_partial_reflect(self: Box<NonZero<i8>>) -> Box<dyn PartialReflect>

Source§

fn as_partial_reflect(&self) -> &(dyn PartialReflect + 'static)

Source§

fn as_partial_reflect_mut(&mut self) -> &mut (dyn PartialReflect + 'static)

Source§

fn reflect_hash(&self) -> Option<u64>

Source§

fn reflect_partial_eq( &self, value: &(dyn PartialReflect + 'static), ) -> Option<bool>

Source§

fn reflect_partial_cmp( &self, value: &(dyn PartialReflect + 'static), ) -> Option<Ordering>

Source§

fn debug(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Source§

fn reflect_clone(&self) -> Result<Box<dyn Reflect>, ReflectCloneError>

Source§

impl PartialReflect for NonZero<i16>

Source§

fn get_represented_type_info(&self) -> Option<&'static TypeInfo>

Source§

fn to_dynamic(&self) -> Box<dyn PartialReflect>

Source§

fn try_apply( &mut self, value: &(dyn PartialReflect + 'static), ) -> Result<(), ApplyError>

Source§

fn reflect_kind(&self) -> ReflectKind

Source§

fn reflect_ref(&self) -> ReflectRef<'_>

Source§

fn reflect_mut(&mut self) -> ReflectMut<'_>

Source§

fn reflect_owned(self: Box<NonZero<i16>>) -> ReflectOwned

Source§

fn try_into_reflect( self: Box<NonZero<i16>>, ) -> Result<Box<dyn Reflect>, Box<dyn PartialReflect>>

Source§

fn try_as_reflect(&self) -> Option<&(dyn Reflect + 'static)>

Source§

fn try_as_reflect_mut(&mut self) -> Option<&mut (dyn Reflect + 'static)>

Source§

fn into_partial_reflect(self: Box<NonZero<i16>>) -> Box<dyn PartialReflect>

Source§

fn as_partial_reflect(&self) -> &(dyn PartialReflect + 'static)

Source§

fn as_partial_reflect_mut(&mut self) -> &mut (dyn PartialReflect + 'static)

Source§

fn reflect_hash(&self) -> Option<u64>

Source§

fn reflect_partial_eq( &self, value: &(dyn PartialReflect + 'static), ) -> Option<bool>

Source§

fn reflect_partial_cmp( &self, value: &(dyn PartialReflect + 'static), ) -> Option<Ordering>

Source§

fn debug(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Source§

fn reflect_clone(&self) -> Result<Box<dyn Reflect>, ReflectCloneError>

Source§

impl PartialReflect for NonZero<i32>

Source§

fn get_represented_type_info(&self) -> Option<&'static TypeInfo>

Source§

fn to_dynamic(&self) -> Box<dyn PartialReflect>

Source§

fn try_apply( &mut self, value: &(dyn PartialReflect + 'static), ) -> Result<(), ApplyError>

Source§

fn reflect_kind(&self) -> ReflectKind

Source§

fn reflect_ref(&self) -> ReflectRef<'_>

Source§

fn reflect_mut(&mut self) -> ReflectMut<'_>

Source§

fn reflect_owned(self: Box<NonZero<i32>>) -> ReflectOwned

Source§

fn try_into_reflect( self: Box<NonZero<i32>>, ) -> Result<Box<dyn Reflect>, Box<dyn PartialReflect>>

Source§

fn try_as_reflect(&self) -> Option<&(dyn Reflect + 'static)>

Source§

fn try_as_reflect_mut(&mut self) -> Option<&mut (dyn Reflect + 'static)>

Source§

fn into_partial_reflect(self: Box<NonZero<i32>>) -> Box<dyn PartialReflect>

Source§

fn as_partial_reflect(&self) -> &(dyn PartialReflect + 'static)

Source§

fn as_partial_reflect_mut(&mut self) -> &mut (dyn PartialReflect + 'static)

Source§

fn reflect_hash(&self) -> Option<u64>

Source§

fn reflect_partial_eq( &self, value: &(dyn PartialReflect + 'static), ) -> Option<bool>

Source§

fn reflect_partial_cmp( &self, value: &(dyn PartialReflect + 'static), ) -> Option<Ordering>

Source§

fn debug(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Source§

fn reflect_clone(&self) -> Result<Box<dyn Reflect>, ReflectCloneError>

Source§

impl PartialReflect for NonZero<i64>

Source§

fn get_represented_type_info(&self) -> Option<&'static TypeInfo>

Source§

fn to_dynamic(&self) -> Box<dyn PartialReflect>

Source§

fn try_apply( &mut self, value: &(dyn PartialReflect + 'static), ) -> Result<(), ApplyError>

Source§

fn reflect_kind(&self) -> ReflectKind

Source§

fn reflect_ref(&self) -> ReflectRef<'_>

Source§

fn reflect_mut(&mut self) -> ReflectMut<'_>

Source§

fn reflect_owned(self: Box<NonZero<i64>>) -> ReflectOwned

Source§

fn try_into_reflect( self: Box<NonZero<i64>>, ) -> Result<Box<dyn Reflect>, Box<dyn PartialReflect>>

Source§

fn try_as_reflect(&self) -> Option<&(dyn Reflect + 'static)>

Source§

fn try_as_reflect_mut(&mut self) -> Option<&mut (dyn Reflect + 'static)>

Source§

fn into_partial_reflect(self: Box<NonZero<i64>>) -> Box<dyn PartialReflect>

Source§

fn as_partial_reflect(&self) -> &(dyn PartialReflect + 'static)

Source§

fn as_partial_reflect_mut(&mut self) -> &mut (dyn PartialReflect + 'static)

Source§

fn reflect_hash(&self) -> Option<u64>

Source§

fn reflect_partial_eq( &self, value: &(dyn PartialReflect + 'static), ) -> Option<bool>

Source§

fn reflect_partial_cmp( &self, value: &(dyn PartialReflect + 'static), ) -> Option<Ordering>

Source§

fn debug(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Source§

fn reflect_clone(&self) -> Result<Box<dyn Reflect>, ReflectCloneError>

Source§

impl PartialReflect for NonZero<i128>

Source§

fn get_represented_type_info(&self) -> Option<&'static TypeInfo>

Source§

fn to_dynamic(&self) -> Box<dyn PartialReflect>

Source§

fn try_apply( &mut self, value: &(dyn PartialReflect + 'static), ) -> Result<(), ApplyError>

Source§

fn reflect_kind(&self) -> ReflectKind

Source§

fn reflect_ref(&self) -> ReflectRef<'_>

Source§

fn reflect_mut(&mut self) -> ReflectMut<'_>

Source§

fn reflect_owned(self: Box<NonZero<i128>>) -> ReflectOwned

Source§

fn try_into_reflect( self: Box<NonZero<i128>>, ) -> Result<Box<dyn Reflect>, Box<dyn PartialReflect>>

Source§

fn try_as_reflect(&self) -> Option<&(dyn Reflect + 'static)>

Source§

fn try_as_reflect_mut(&mut self) -> Option<&mut (dyn Reflect + 'static)>

Source§

fn into_partial_reflect(self: Box<NonZero<i128>>) -> Box<dyn PartialReflect>

Source§

fn as_partial_reflect(&self) -> &(dyn PartialReflect + 'static)

Source§

fn as_partial_reflect_mut(&mut self) -> &mut (dyn PartialReflect + 'static)

Source§

fn reflect_hash(&self) -> Option<u64>

Source§

fn reflect_partial_eq( &self, value: &(dyn PartialReflect + 'static), ) -> Option<bool>

Source§

fn reflect_partial_cmp( &self, value: &(dyn PartialReflect + 'static), ) -> Option<Ordering>

Source§

fn debug(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Source§

fn reflect_clone(&self) -> Result<Box<dyn Reflect>, ReflectCloneError>

Source§

impl PartialReflect for NonZero<isize>

Source§

fn get_represented_type_info(&self) -> Option<&'static TypeInfo>

Source§

fn to_dynamic(&self) -> Box<dyn PartialReflect>

Source§

fn try_apply( &mut self, value: &(dyn PartialReflect + 'static), ) -> Result<(), ApplyError>

Source§

fn reflect_kind(&self) -> ReflectKind

Source§

fn reflect_ref(&self) -> ReflectRef<'_>

Source§

fn reflect_mut(&mut self) -> ReflectMut<'_>

Source§

fn reflect_owned(self: Box<NonZero<isize>>) -> ReflectOwned

Source§

fn try_into_reflect( self: Box<NonZero<isize>>, ) -> Result<Box<dyn Reflect>, Box<dyn PartialReflect>>

Source§

fn try_as_reflect(&self) -> Option<&(dyn Reflect + 'static)>

Source§

fn try_as_reflect_mut(&mut self) -> Option<&mut (dyn Reflect + 'static)>

Source§

fn into_partial_reflect(self: Box<NonZero<isize>>) -> Box<dyn PartialReflect>

Source§

fn as_partial_reflect(&self) -> &(dyn PartialReflect + 'static)

Source§

fn as_partial_reflect_mut(&mut self) -> &mut (dyn PartialReflect + 'static)

Source§

fn reflect_hash(&self) -> Option<u64>

Source§

fn reflect_partial_eq( &self, value: &(dyn PartialReflect + 'static), ) -> Option<bool>

Source§

fn reflect_partial_cmp( &self, value: &(dyn PartialReflect + 'static), ) -> Option<Ordering>

Source§

fn debug(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Source§

fn reflect_clone(&self) -> Result<Box<dyn Reflect>, ReflectCloneError>

Source§

impl PartialReflect for NonZero<u8>

Source§

fn get_represented_type_info(&self) -> Option<&'static TypeInfo>

Source§

fn to_dynamic(&self) -> Box<dyn PartialReflect>

Source§

fn try_apply( &mut self, value: &(dyn PartialReflect + 'static), ) -> Result<(), ApplyError>

Source§

fn reflect_kind(&self) -> ReflectKind

Source§

fn reflect_ref(&self) -> ReflectRef<'_>

Source§

fn reflect_mut(&mut self) -> ReflectMut<'_>

Source§

fn reflect_owned(self: Box<NonZero<u8>>) -> ReflectOwned

Source§

fn try_into_reflect( self: Box<NonZero<u8>>, ) -> Result<Box<dyn Reflect>, Box<dyn PartialReflect>>

Source§

fn try_as_reflect(&self) -> Option<&(dyn Reflect + 'static)>

Source§

fn try_as_reflect_mut(&mut self) -> Option<&mut (dyn Reflect + 'static)>

Source§

fn into_partial_reflect(self: Box<NonZero<u8>>) -> Box<dyn PartialReflect>

Source§

fn as_partial_reflect(&self) -> &(dyn PartialReflect + 'static)

Source§

fn as_partial_reflect_mut(&mut self) -> &mut (dyn PartialReflect + 'static)

Source§

fn reflect_hash(&self) -> Option<u64>

Source§

fn reflect_partial_eq( &self, value: &(dyn PartialReflect + 'static), ) -> Option<bool>

Source§

fn reflect_partial_cmp( &self, value: &(dyn PartialReflect + 'static), ) -> Option<Ordering>

Source§

fn debug(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Source§

fn reflect_clone(&self) -> Result<Box<dyn Reflect>, ReflectCloneError>

Source§

impl PartialReflect for NonZero<u16>

Source§

fn get_represented_type_info(&self) -> Option<&'static TypeInfo>

Source§

fn to_dynamic(&self) -> Box<dyn PartialReflect>

Source§

fn try_apply( &mut self, value: &(dyn PartialReflect + 'static), ) -> Result<(), ApplyError>

Source§

fn reflect_kind(&self) -> ReflectKind

Source§

fn reflect_ref(&self) -> ReflectRef<'_>

Source§

fn reflect_mut(&mut self) -> ReflectMut<'_>

Source§

fn reflect_owned(self: Box<NonZero<u16>>) -> ReflectOwned

Source§

fn try_into_reflect( self: Box<NonZero<u16>>, ) -> Result<Box<dyn Reflect>, Box<dyn PartialReflect>>

Source§

fn try_as_reflect(&self) -> Option<&(dyn Reflect + 'static)>

Source§

fn try_as_reflect_mut(&mut self) -> Option<&mut (dyn Reflect + 'static)>

Source§

fn into_partial_reflect(self: Box<NonZero<u16>>) -> Box<dyn PartialReflect>

Source§

fn as_partial_reflect(&self) -> &(dyn PartialReflect + 'static)

Source§

fn as_partial_reflect_mut(&mut self) -> &mut (dyn PartialReflect + 'static)

Source§

fn reflect_hash(&self) -> Option<u64>

Source§

fn reflect_partial_eq( &self, value: &(dyn PartialReflect + 'static), ) -> Option<bool>

Source§

fn reflect_partial_cmp( &self, value: &(dyn PartialReflect + 'static), ) -> Option<Ordering>

Source§

fn debug(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Source§

fn reflect_clone(&self) -> Result<Box<dyn Reflect>, ReflectCloneError>

Source§

impl PartialReflect for NonZero<u32>

Source§

fn get_represented_type_info(&self) -> Option<&'static TypeInfo>

Source§

fn to_dynamic(&self) -> Box<dyn PartialReflect>

Source§

fn try_apply( &mut self, value: &(dyn PartialReflect + 'static), ) -> Result<(), ApplyError>

Source§

fn reflect_kind(&self) -> ReflectKind

Source§

fn reflect_ref(&self) -> ReflectRef<'_>

Source§

fn reflect_mut(&mut self) -> ReflectMut<'_>

Source§

fn reflect_owned(self: Box<NonZero<u32>>) -> ReflectOwned

Source§

fn try_into_reflect( self: Box<NonZero<u32>>, ) -> Result<Box<dyn Reflect>, Box<dyn PartialReflect>>

Source§

fn try_as_reflect(&self) -> Option<&(dyn Reflect + 'static)>

Source§

fn try_as_reflect_mut(&mut self) -> Option<&mut (dyn Reflect + 'static)>

Source§

fn into_partial_reflect(self: Box<NonZero<u32>>) -> Box<dyn PartialReflect>

Source§

fn as_partial_reflect(&self) -> &(dyn PartialReflect + 'static)

Source§

fn as_partial_reflect_mut(&mut self) -> &mut (dyn PartialReflect + 'static)

Source§

fn reflect_hash(&self) -> Option<u64>

Source§

fn reflect_partial_eq( &self, value: &(dyn PartialReflect + 'static), ) -> Option<bool>

Source§

fn reflect_partial_cmp( &self, value: &(dyn PartialReflect + 'static), ) -> Option<Ordering>

Source§

fn debug(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Source§

fn reflect_clone(&self) -> Result<Box<dyn Reflect>, ReflectCloneError>

Source§

impl PartialReflect for NonZero<u64>

Source§

fn get_represented_type_info(&self) -> Option<&'static TypeInfo>

Source§

fn to_dynamic(&self) -> Box<dyn PartialReflect>

Source§

fn try_apply( &mut self, value: &(dyn PartialReflect + 'static), ) -> Result<(), ApplyError>

Source§

fn reflect_kind(&self) -> ReflectKind

Source§

fn reflect_ref(&self) -> ReflectRef<'_>

Source§

fn reflect_mut(&mut self) -> ReflectMut<'_>

Source§

fn reflect_owned(self: Box<NonZero<u64>>) -> ReflectOwned

Source§

fn try_into_reflect( self: Box<NonZero<u64>>, ) -> Result<Box<dyn Reflect>, Box<dyn PartialReflect>>

Source§

fn try_as_reflect(&self) -> Option<&(dyn Reflect + 'static)>

Source§

fn try_as_reflect_mut(&mut self) -> Option<&mut (dyn Reflect + 'static)>

Source§

fn into_partial_reflect(self: Box<NonZero<u64>>) -> Box<dyn PartialReflect>

Source§

fn as_partial_reflect(&self) -> &(dyn PartialReflect + 'static)

Source§

fn as_partial_reflect_mut(&mut self) -> &mut (dyn PartialReflect + 'static)

Source§

fn reflect_hash(&self) -> Option<u64>

Source§

fn reflect_partial_eq( &self, value: &(dyn PartialReflect + 'static), ) -> Option<bool>

Source§

fn reflect_partial_cmp( &self, value: &(dyn PartialReflect + 'static), ) -> Option<Ordering>

Source§

fn debug(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Source§

fn reflect_clone(&self) -> Result<Box<dyn Reflect>, ReflectCloneError>

Source§

impl PartialReflect for NonZero<u128>

Source§

fn get_represented_type_info(&self) -> Option<&'static TypeInfo>

Source§

fn to_dynamic(&self) -> Box<dyn PartialReflect>

Source§

fn try_apply( &mut self, value: &(dyn PartialReflect + 'static), ) -> Result<(), ApplyError>

Source§

fn reflect_kind(&self) -> ReflectKind

Source§

fn reflect_ref(&self) -> ReflectRef<'_>

Source§

fn reflect_mut(&mut self) -> ReflectMut<'_>

Source§

fn reflect_owned(self: Box<NonZero<u128>>) -> ReflectOwned

Source§

fn try_into_reflect( self: Box<NonZero<u128>>, ) -> Result<Box<dyn Reflect>, Box<dyn PartialReflect>>

Source§

fn try_as_reflect(&self) -> Option<&(dyn Reflect + 'static)>

Source§

fn try_as_reflect_mut(&mut self) -> Option<&mut (dyn Reflect + 'static)>

Source§

fn into_partial_reflect(self: Box<NonZero<u128>>) -> Box<dyn PartialReflect>

Source§

fn as_partial_reflect(&self) -> &(dyn PartialReflect + 'static)

Source§

fn as_partial_reflect_mut(&mut self) -> &mut (dyn PartialReflect + 'static)

Source§

fn reflect_hash(&self) -> Option<u64>

Source§

fn reflect_partial_eq( &self, value: &(dyn PartialReflect + 'static), ) -> Option<bool>

Source§

fn reflect_partial_cmp( &self, value: &(dyn PartialReflect + 'static), ) -> Option<Ordering>

Source§

fn debug(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Source§

fn reflect_clone(&self) -> Result<Box<dyn Reflect>, ReflectCloneError>

Source§

impl PartialReflect for NonZero<usize>

Source§

fn get_represented_type_info(&self) -> Option<&'static TypeInfo>

Source§

fn to_dynamic(&self) -> Box<dyn PartialReflect>

Source§

fn try_apply( &mut self, value: &(dyn PartialReflect + 'static), ) -> Result<(), ApplyError>

Source§

fn reflect_kind(&self) -> ReflectKind

Source§

fn reflect_ref(&self) -> ReflectRef<'_>

Source§

fn reflect_mut(&mut self) -> ReflectMut<'_>

Source§

fn reflect_owned(self: Box<NonZero<usize>>) -> ReflectOwned

Source§

fn try_into_reflect( self: Box<NonZero<usize>>, ) -> Result<Box<dyn Reflect>, Box<dyn PartialReflect>>

Source§

fn try_as_reflect(&self) -> Option<&(dyn Reflect + 'static)>

Source§

fn try_as_reflect_mut(&mut self) -> Option<&mut (dyn Reflect + 'static)>

Source§

fn into_partial_reflect(self: Box<NonZero<usize>>) -> Box<dyn PartialReflect>

Source§

fn as_partial_reflect(&self) -> &(dyn PartialReflect + 'static)

Source§

fn as_partial_reflect_mut(&mut self) -> &mut (dyn PartialReflect + 'static)

Source§

fn reflect_hash(&self) -> Option<u64>

Source§

fn reflect_partial_eq( &self, value: &(dyn PartialReflect + 'static), ) -> Option<bool>

Source§

fn reflect_partial_cmp( &self, value: &(dyn PartialReflect + 'static), ) -> Option<Ordering>

Source§

fn debug(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Source§

fn reflect_clone(&self) -> Result<Box<dyn Reflect>, ReflectCloneError>

Source§

impl PartialReflect for OsString

Source§

fn get_represented_type_info(&self) -> Option<&'static TypeInfo>

Source§

fn to_dynamic(&self) -> Box<dyn PartialReflect>

Source§

fn try_apply( &mut self, value: &(dyn PartialReflect + 'static), ) -> Result<(), ApplyError>

Source§

fn reflect_kind(&self) -> ReflectKind

Source§

fn reflect_ref(&self) -> ReflectRef<'_>

Source§

fn reflect_mut(&mut self) -> ReflectMut<'_>

Source§

fn reflect_owned(self: Box<OsString>) -> ReflectOwned

Source§

fn try_into_reflect( self: Box<OsString>, ) -> Result<Box<dyn Reflect>, Box<dyn PartialReflect>>

Source§

fn try_as_reflect(&self) -> Option<&(dyn Reflect + 'static)>

Source§

fn try_as_reflect_mut(&mut self) -> Option<&mut (dyn Reflect + 'static)>

Source§

fn into_partial_reflect(self: Box<OsString>) -> Box<dyn PartialReflect>

Source§

fn as_partial_reflect(&self) -> &(dyn PartialReflect + 'static)

Source§

fn as_partial_reflect_mut(&mut self) -> &mut (dyn PartialReflect + 'static)

Source§

fn reflect_hash(&self) -> Option<u64>

Source§

fn reflect_partial_eq( &self, value: &(dyn PartialReflect + 'static), ) -> Option<bool>

Source§

fn reflect_partial_cmp( &self, value: &(dyn PartialReflect + 'static), ) -> Option<Ordering>

Source§

fn debug(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Source§

fn reflect_clone(&self) -> Result<Box<dyn Reflect>, ReflectCloneError>

Source§

impl PartialReflect for PathBuf

Source§

fn get_represented_type_info(&self) -> Option<&'static TypeInfo>

Source§

fn to_dynamic(&self) -> Box<dyn PartialReflect>

Source§

fn try_apply( &mut self, value: &(dyn PartialReflect + 'static), ) -> Result<(), ApplyError>

Source§

fn reflect_kind(&self) -> ReflectKind

Source§

fn reflect_ref(&self) -> ReflectRef<'_>

Source§

fn reflect_mut(&mut self) -> ReflectMut<'_>

Source§

fn reflect_owned(self: Box<PathBuf>) -> ReflectOwned

Source§

fn try_into_reflect( self: Box<PathBuf>, ) -> Result<Box<dyn Reflect>, Box<dyn PartialReflect>>

Source§

fn try_as_reflect(&self) -> Option<&(dyn Reflect + 'static)>

Source§

fn try_as_reflect_mut(&mut self) -> Option<&mut (dyn Reflect + 'static)>

Source§

fn into_partial_reflect(self: Box<PathBuf>) -> Box<dyn PartialReflect>

Source§

fn as_partial_reflect(&self) -> &(dyn PartialReflect + 'static)

Source§

fn as_partial_reflect_mut(&mut self) -> &mut (dyn PartialReflect + 'static)

Source§

fn reflect_hash(&self) -> Option<u64>

Source§

fn reflect_partial_eq( &self, value: &(dyn PartialReflect + 'static), ) -> Option<bool>

Source§

fn reflect_partial_cmp( &self, value: &(dyn PartialReflect + 'static), ) -> Option<Ordering>

Source§

fn debug(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Source§

fn reflect_clone(&self) -> Result<Box<dyn Reflect>, ReflectCloneError>

Source§

impl PartialReflect for RangeFull

Source§

impl PartialReflect for SmolStr

Source§

fn get_represented_type_info(&self) -> Option<&'static TypeInfo>

Source§

fn to_dynamic(&self) -> Box<dyn PartialReflect>

Source§

fn try_apply( &mut self, value: &(dyn PartialReflect + 'static), ) -> Result<(), ApplyError>

Source§

fn reflect_kind(&self) -> ReflectKind

Source§

fn reflect_ref(&self) -> ReflectRef<'_>

Source§

fn reflect_mut(&mut self) -> ReflectMut<'_>

Source§

fn reflect_owned(self: Box<SmolStr>) -> ReflectOwned

Source§

fn try_into_reflect( self: Box<SmolStr>, ) -> Result<Box<dyn Reflect>, Box<dyn PartialReflect>>

Source§

fn try_as_reflect(&self) -> Option<&(dyn Reflect + 'static)>

Source§

fn try_as_reflect_mut(&mut self) -> Option<&mut (dyn Reflect + 'static)>

Source§

fn into_partial_reflect(self: Box<SmolStr>) -> Box<dyn PartialReflect>

Source§

fn as_partial_reflect(&self) -> &(dyn PartialReflect + 'static)

Source§

fn as_partial_reflect_mut(&mut self) -> &mut (dyn PartialReflect + 'static)

Source§

fn reflect_hash(&self) -> Option<u64>

Source§

fn reflect_partial_eq( &self, value: &(dyn PartialReflect + 'static), ) -> Option<bool>

Source§

fn reflect_partial_cmp( &self, value: &(dyn PartialReflect + 'static), ) -> Option<Ordering>

Source§

fn debug(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Source§

fn reflect_clone(&self) -> Result<Box<dyn Reflect>, ReflectCloneError>

Source§

impl PartialReflect for SocketAddr

Source§

fn get_represented_type_info(&self) -> Option<&'static TypeInfo>

Source§

fn to_dynamic(&self) -> Box<dyn PartialReflect>

Source§

fn try_apply( &mut self, value: &(dyn PartialReflect + 'static), ) -> Result<(), ApplyError>

Source§

fn reflect_kind(&self) -> ReflectKind

Source§

fn reflect_ref(&self) -> ReflectRef<'_>

Source§

fn reflect_mut(&mut self) -> ReflectMut<'_>

Source§

fn reflect_owned(self: Box<SocketAddr>) -> ReflectOwned

Source§

fn try_into_reflect( self: Box<SocketAddr>, ) -> Result<Box<dyn Reflect>, Box<dyn PartialReflect>>

Source§

fn try_as_reflect(&self) -> Option<&(dyn Reflect + 'static)>

Source§

fn try_as_reflect_mut(&mut self) -> Option<&mut (dyn Reflect + 'static)>

Source§

fn into_partial_reflect(self: Box<SocketAddr>) -> Box<dyn PartialReflect>

Source§

fn as_partial_reflect(&self) -> &(dyn PartialReflect + 'static)

Source§

fn as_partial_reflect_mut(&mut self) -> &mut (dyn PartialReflect + 'static)

Source§

fn reflect_hash(&self) -> Option<u64>

Source§

fn reflect_partial_eq( &self, value: &(dyn PartialReflect + 'static), ) -> Option<bool>

Source§

fn reflect_partial_cmp( &self, value: &(dyn PartialReflect + 'static), ) -> Option<Ordering>

Source§

fn debug(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Source§

fn reflect_clone(&self) -> Result<Box<dyn Reflect>, ReflectCloneError>

Source§

impl PartialReflect for TypeId

Source§

fn get_represented_type_info(&self) -> Option<&'static TypeInfo>

Source§

fn to_dynamic(&self) -> Box<dyn PartialReflect>

Source§

fn try_apply( &mut self, value: &(dyn PartialReflect + 'static), ) -> Result<(), ApplyError>

Source§

fn reflect_kind(&self) -> ReflectKind

Source§

fn reflect_ref(&self) -> ReflectRef<'_>

Source§

fn reflect_mut(&mut self) -> ReflectMut<'_>

Source§

fn reflect_owned(self: Box<TypeId>) -> ReflectOwned

Source§

fn try_into_reflect( self: Box<TypeId>, ) -> Result<Box<dyn Reflect>, Box<dyn PartialReflect>>

Source§

fn try_as_reflect(&self) -> Option<&(dyn Reflect + 'static)>

Source§

fn try_as_reflect_mut(&mut self) -> Option<&mut (dyn Reflect + 'static)>

Source§

fn into_partial_reflect(self: Box<TypeId>) -> Box<dyn PartialReflect>

Source§

fn as_partial_reflect(&self) -> &(dyn PartialReflect + 'static)

Source§

fn as_partial_reflect_mut(&mut self) -> &mut (dyn PartialReflect + 'static)

Source§

fn reflect_hash(&self) -> Option<u64>

Source§

fn reflect_partial_eq( &self, value: &(dyn PartialReflect + 'static), ) -> Option<bool>

Source§

fn debug(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Source§

fn reflect_clone(&self) -> Result<Box<dyn Reflect>, ReflectCloneError>

Source§

impl PartialReflect for bool

Source§

fn get_represented_type_info(&self) -> Option<&'static TypeInfo>

Source§

fn to_dynamic(&self) -> Box<dyn PartialReflect>

Source§

fn try_apply( &mut self, value: &(dyn PartialReflect + 'static), ) -> Result<(), ApplyError>

Source§

fn reflect_kind(&self) -> ReflectKind

Source§

fn reflect_ref(&self) -> ReflectRef<'_>

Source§

fn reflect_mut(&mut self) -> ReflectMut<'_>

Source§

fn reflect_owned(self: Box<bool>) -> ReflectOwned

Source§

fn try_into_reflect( self: Box<bool>, ) -> Result<Box<dyn Reflect>, Box<dyn PartialReflect>>

Source§

fn try_as_reflect(&self) -> Option<&(dyn Reflect + 'static)>

Source§

fn try_as_reflect_mut(&mut self) -> Option<&mut (dyn Reflect + 'static)>

Source§

fn into_partial_reflect(self: Box<bool>) -> Box<dyn PartialReflect>

Source§

fn as_partial_reflect(&self) -> &(dyn PartialReflect + 'static)

Source§

fn as_partial_reflect_mut(&mut self) -> &mut (dyn PartialReflect + 'static)

Source§

fn reflect_hash(&self) -> Option<u64>

Source§

fn reflect_partial_eq( &self, value: &(dyn PartialReflect + 'static), ) -> Option<bool>

Source§

fn reflect_partial_cmp( &self, value: &(dyn PartialReflect + 'static), ) -> Option<Ordering>

Source§

fn debug(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Source§

fn reflect_clone(&self) -> Result<Box<dyn Reflect>, ReflectCloneError>

Source§

impl PartialReflect for char

Source§

fn get_represented_type_info(&self) -> Option<&'static TypeInfo>

Source§

fn to_dynamic(&self) -> Box<dyn PartialReflect>

Source§

fn try_apply( &mut self, value: &(dyn PartialReflect + 'static), ) -> Result<(), ApplyError>

Source§

fn reflect_kind(&self) -> ReflectKind

Source§

fn reflect_ref(&self) -> ReflectRef<'_>

Source§

fn reflect_mut(&mut self) -> ReflectMut<'_>

Source§

fn reflect_owned(self: Box<char>) -> ReflectOwned

Source§

fn try_into_reflect( self: Box<char>, ) -> Result<Box<dyn Reflect>, Box<dyn PartialReflect>>

Source§

fn try_as_reflect(&self) -> Option<&(dyn Reflect + 'static)>

Source§

fn try_as_reflect_mut(&mut self) -> Option<&mut (dyn Reflect + 'static)>

Source§

fn into_partial_reflect(self: Box<char>) -> Box<dyn PartialReflect>

Source§

fn as_partial_reflect(&self) -> &(dyn PartialReflect + 'static)

Source§

fn as_partial_reflect_mut(&mut self) -> &mut (dyn PartialReflect + 'static)

Source§

fn reflect_hash(&self) -> Option<u64>

Source§

fn reflect_partial_eq( &self, value: &(dyn PartialReflect + 'static), ) -> Option<bool>

Source§

fn reflect_partial_cmp( &self, value: &(dyn PartialReflect + 'static), ) -> Option<Ordering>

Source§

fn debug(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Source§

fn reflect_clone(&self) -> Result<Box<dyn Reflect>, ReflectCloneError>

Source§

impl PartialReflect for f32

Source§

fn get_represented_type_info(&self) -> Option<&'static TypeInfo>

Source§

fn to_dynamic(&self) -> Box<dyn PartialReflect>

Source§

fn try_apply( &mut self, value: &(dyn PartialReflect + 'static), ) -> Result<(), ApplyError>

Source§

fn reflect_kind(&self) -> ReflectKind

Source§

fn reflect_ref(&self) -> ReflectRef<'_>

Source§

fn reflect_mut(&mut self) -> ReflectMut<'_>

Source§

fn reflect_owned(self: Box<f32>) -> ReflectOwned

Source§

fn try_into_reflect( self: Box<f32>, ) -> Result<Box<dyn Reflect>, Box<dyn PartialReflect>>

Source§

fn try_as_reflect(&self) -> Option<&(dyn Reflect + 'static)>

Source§

fn try_as_reflect_mut(&mut self) -> Option<&mut (dyn Reflect + 'static)>

Source§

fn into_partial_reflect(self: Box<f32>) -> Box<dyn PartialReflect>

Source§

fn as_partial_reflect(&self) -> &(dyn PartialReflect + 'static)

Source§

fn as_partial_reflect_mut(&mut self) -> &mut (dyn PartialReflect + 'static)

Source§

fn reflect_partial_eq( &self, value: &(dyn PartialReflect + 'static), ) -> Option<bool>

Source§

fn reflect_partial_cmp( &self, value: &(dyn PartialReflect + 'static), ) -> Option<Ordering>

Source§

fn debug(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Source§

fn reflect_clone(&self) -> Result<Box<dyn Reflect>, ReflectCloneError>

Source§

impl PartialReflect for f64

Source§

fn get_represented_type_info(&self) -> Option<&'static TypeInfo>

Source§

fn to_dynamic(&self) -> Box<dyn PartialReflect>

Source§

fn try_apply( &mut self, value: &(dyn PartialReflect + 'static), ) -> Result<(), ApplyError>

Source§

fn reflect_kind(&self) -> ReflectKind

Source§

fn reflect_ref(&self) -> ReflectRef<'_>

Source§

fn reflect_mut(&mut self) -> ReflectMut<'_>

Source§

fn reflect_owned(self: Box<f64>) -> ReflectOwned

Source§

fn try_into_reflect( self: Box<f64>, ) -> Result<Box<dyn Reflect>, Box<dyn PartialReflect>>

Source§

fn try_as_reflect(&self) -> Option<&(dyn Reflect + 'static)>

Source§

fn try_as_reflect_mut(&mut self) -> Option<&mut (dyn Reflect + 'static)>

Source§

fn into_partial_reflect(self: Box<f64>) -> Box<dyn PartialReflect>

Source§

fn as_partial_reflect(&self) -> &(dyn PartialReflect + 'static)

Source§

fn as_partial_reflect_mut(&mut self) -> &mut (dyn PartialReflect + 'static)

Source§

fn reflect_partial_eq( &self, value: &(dyn PartialReflect + 'static), ) -> Option<bool>

Source§

fn reflect_partial_cmp( &self, value: &(dyn PartialReflect + 'static), ) -> Option<Ordering>

Source§

fn debug(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Source§

fn reflect_clone(&self) -> Result<Box<dyn Reflect>, ReflectCloneError>

Source§

impl PartialReflect for i8

Source§

fn get_represented_type_info(&self) -> Option<&'static TypeInfo>

Source§

fn to_dynamic(&self) -> Box<dyn PartialReflect>

Source§

fn try_apply( &mut self, value: &(dyn PartialReflect + 'static), ) -> Result<(), ApplyError>

Source§

fn reflect_kind(&self) -> ReflectKind

Source§

fn reflect_ref(&self) -> ReflectRef<'_>

Source§

fn reflect_mut(&mut self) -> ReflectMut<'_>

Source§

fn reflect_owned(self: Box<i8>) -> ReflectOwned

Source§

fn try_into_reflect( self: Box<i8>, ) -> Result<Box<dyn Reflect>, Box<dyn PartialReflect>>

Source§

fn try_as_reflect(&self) -> Option<&(dyn Reflect + 'static)>

Source§

fn try_as_reflect_mut(&mut self) -> Option<&mut (dyn Reflect + 'static)>

Source§

fn into_partial_reflect(self: Box<i8>) -> Box<dyn PartialReflect>

Source§

fn as_partial_reflect(&self) -> &(dyn PartialReflect + 'static)

Source§

fn as_partial_reflect_mut(&mut self) -> &mut (dyn PartialReflect + 'static)

Source§

fn reflect_hash(&self) -> Option<u64>

Source§

fn reflect_partial_eq( &self, value: &(dyn PartialReflect + 'static), ) -> Option<bool>

Source§

fn reflect_partial_cmp( &self, value: &(dyn PartialReflect + 'static), ) -> Option<Ordering>

Source§

fn debug(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Source§

fn reflect_clone(&self) -> Result<Box<dyn Reflect>, ReflectCloneError>

Source§

impl PartialReflect for i16

Source§

fn get_represented_type_info(&self) -> Option<&'static TypeInfo>

Source§

fn to_dynamic(&self) -> Box<dyn PartialReflect>

Source§

fn try_apply( &mut self, value: &(dyn PartialReflect + 'static), ) -> Result<(), ApplyError>

Source§

fn reflect_kind(&self) -> ReflectKind

Source§

fn reflect_ref(&self) -> ReflectRef<'_>

Source§

fn reflect_mut(&mut self) -> ReflectMut<'_>

Source§

fn reflect_owned(self: Box<i16>) -> ReflectOwned

Source§

fn try_into_reflect( self: Box<i16>, ) -> Result<Box<dyn Reflect>, Box<dyn PartialReflect>>

Source§

fn try_as_reflect(&self) -> Option<&(dyn Reflect + 'static)>

Source§

fn try_as_reflect_mut(&mut self) -> Option<&mut (dyn Reflect + 'static)>

Source§

fn into_partial_reflect(self: Box<i16>) -> Box<dyn PartialReflect>

Source§

fn as_partial_reflect(&self) -> &(dyn PartialReflect + 'static)

Source§

fn as_partial_reflect_mut(&mut self) -> &mut (dyn PartialReflect + 'static)

Source§

fn reflect_hash(&self) -> Option<u64>

Source§

fn reflect_partial_eq( &self, value: &(dyn PartialReflect + 'static), ) -> Option<bool>

Source§

fn reflect_partial_cmp( &self, value: &(dyn PartialReflect + 'static), ) -> Option<Ordering>

Source§

fn debug(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Source§

fn reflect_clone(&self) -> Result<Box<dyn Reflect>, ReflectCloneError>

Source§

impl PartialReflect for i32

Source§

fn get_represented_type_info(&self) -> Option<&'static TypeInfo>

Source§

fn to_dynamic(&self) -> Box<dyn PartialReflect>

Source§

fn try_apply( &mut self, value: &(dyn PartialReflect + 'static), ) -> Result<(), ApplyError>

Source§

fn reflect_kind(&self) -> ReflectKind

Source§

fn reflect_ref(&self) -> ReflectRef<'_>

Source§

fn reflect_mut(&mut self) -> ReflectMut<'_>

Source§

fn reflect_owned(self: Box<i32>) -> ReflectOwned

Source§

fn try_into_reflect( self: Box<i32>, ) -> Result<Box<dyn Reflect>, Box<dyn PartialReflect>>

Source§

fn try_as_reflect(&self) -> Option<&(dyn Reflect + 'static)>

Source§

fn try_as_reflect_mut(&mut self) -> Option<&mut (dyn Reflect + 'static)>

Source§

fn into_partial_reflect(self: Box<i32>) -> Box<dyn PartialReflect>

Source§

fn as_partial_reflect(&self) -> &(dyn PartialReflect + 'static)

Source§

fn as_partial_reflect_mut(&mut self) -> &mut (dyn PartialReflect + 'static)

Source§

fn reflect_hash(&self) -> Option<u64>

Source§

fn reflect_partial_eq( &self, value: &(dyn PartialReflect + 'static), ) -> Option<bool>

Source§

fn reflect_partial_cmp( &self, value: &(dyn PartialReflect + 'static), ) -> Option<Ordering>

Source§

fn debug(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Source§

fn reflect_clone(&self) -> Result<Box<dyn Reflect>, ReflectCloneError>

Source§

impl PartialReflect for i64

Source§

fn get_represented_type_info(&self) -> Option<&'static TypeInfo>

Source§

fn to_dynamic(&self) -> Box<dyn PartialReflect>

Source§

fn try_apply( &mut self, value: &(dyn PartialReflect + 'static), ) -> Result<(), ApplyError>

Source§

fn reflect_kind(&self) -> ReflectKind

Source§

fn reflect_ref(&self) -> ReflectRef<'_>

Source§

fn reflect_mut(&mut self) -> ReflectMut<'_>

Source§

fn reflect_owned(self: Box<i64>) -> ReflectOwned

Source§

fn try_into_reflect( self: Box<i64>, ) -> Result<Box<dyn Reflect>, Box<dyn PartialReflect>>

Source§

fn try_as_reflect(&self) -> Option<&(dyn Reflect + 'static)>

Source§

fn try_as_reflect_mut(&mut self) -> Option<&mut (dyn Reflect + 'static)>

Source§

fn into_partial_reflect(self: Box<i64>) -> Box<dyn PartialReflect>

Source§

fn as_partial_reflect(&self) -> &(dyn PartialReflect + 'static)

Source§

fn as_partial_reflect_mut(&mut self) -> &mut (dyn PartialReflect + 'static)

Source§

fn reflect_hash(&self) -> Option<u64>

Source§

fn reflect_partial_eq( &self, value: &(dyn PartialReflect + 'static), ) -> Option<bool>

Source§

fn reflect_partial_cmp( &self, value: &(dyn PartialReflect + 'static), ) -> Option<Ordering>

Source§

fn debug(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Source§

fn reflect_clone(&self) -> Result<Box<dyn Reflect>, ReflectCloneError>

Source§

impl PartialReflect for i128

Source§

fn get_represented_type_info(&self) -> Option<&'static TypeInfo>

Source§

fn to_dynamic(&self) -> Box<dyn PartialReflect>

Source§

fn try_apply( &mut self, value: &(dyn PartialReflect + 'static), ) -> Result<(), ApplyError>

Source§

fn reflect_kind(&self) -> ReflectKind

Source§

fn reflect_ref(&self) -> ReflectRef<'_>

Source§

fn reflect_mut(&mut self) -> ReflectMut<'_>

Source§

fn reflect_owned(self: Box<i128>) -> ReflectOwned

Source§

fn try_into_reflect( self: Box<i128>, ) -> Result<Box<dyn Reflect>, Box<dyn PartialReflect>>

Source§

fn try_as_reflect(&self) -> Option<&(dyn Reflect + 'static)>

Source§

fn try_as_reflect_mut(&mut self) -> Option<&mut (dyn Reflect + 'static)>

Source§

fn into_partial_reflect(self: Box<i128>) -> Box<dyn PartialReflect>

Source§

fn as_partial_reflect(&self) -> &(dyn PartialReflect + 'static)

Source§

fn as_partial_reflect_mut(&mut self) -> &mut (dyn PartialReflect + 'static)

Source§

fn reflect_hash(&self) -> Option<u64>

Source§

fn reflect_partial_eq( &self, value: &(dyn PartialReflect + 'static), ) -> Option<bool>

Source§

fn reflect_partial_cmp( &self, value: &(dyn PartialReflect + 'static), ) -> Option<Ordering>

Source§

fn debug(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Source§

fn reflect_clone(&self) -> Result<Box<dyn Reflect>, ReflectCloneError>

Source§

impl PartialReflect for isize

Source§

fn get_represented_type_info(&self) -> Option<&'static TypeInfo>

Source§

fn to_dynamic(&self) -> Box<dyn PartialReflect>

Source§

fn try_apply( &mut self, value: &(dyn PartialReflect + 'static), ) -> Result<(), ApplyError>

Source§

fn reflect_kind(&self) -> ReflectKind

Source§

fn reflect_ref(&self) -> ReflectRef<'_>

Source§

fn reflect_mut(&mut self) -> ReflectMut<'_>

Source§

fn reflect_owned(self: Box<isize>) -> ReflectOwned

Source§

fn try_into_reflect( self: Box<isize>, ) -> Result<Box<dyn Reflect>, Box<dyn PartialReflect>>

Source§

fn try_as_reflect(&self) -> Option<&(dyn Reflect + 'static)>

Source§

fn try_as_reflect_mut(&mut self) -> Option<&mut (dyn Reflect + 'static)>

Source§

fn into_partial_reflect(self: Box<isize>) -> Box<dyn PartialReflect>

Source§

fn as_partial_reflect(&self) -> &(dyn PartialReflect + 'static)

Source§

fn as_partial_reflect_mut(&mut self) -> &mut (dyn PartialReflect + 'static)

Source§

fn reflect_hash(&self) -> Option<u64>

Source§

fn reflect_partial_eq( &self, value: &(dyn PartialReflect + 'static), ) -> Option<bool>

Source§

fn reflect_partial_cmp( &self, value: &(dyn PartialReflect + 'static), ) -> Option<Ordering>

Source§

fn debug(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Source§

fn reflect_clone(&self) -> Result<Box<dyn Reflect>, ReflectCloneError>

Source§

impl PartialReflect for u8

Source§

fn get_represented_type_info(&self) -> Option<&'static TypeInfo>

Source§

fn to_dynamic(&self) -> Box<dyn PartialReflect>

Source§

fn try_apply( &mut self, value: &(dyn PartialReflect + 'static), ) -> Result<(), ApplyError>

Source§

fn reflect_kind(&self) -> ReflectKind

Source§

fn reflect_ref(&self) -> ReflectRef<'_>

Source§

fn reflect_mut(&mut self) -> ReflectMut<'_>

Source§

fn reflect_owned(self: Box<u8>) -> ReflectOwned

Source§

fn try_into_reflect( self: Box<u8>, ) -> Result<Box<dyn Reflect>, Box<dyn PartialReflect>>

Source§

fn try_as_reflect(&self) -> Option<&(dyn Reflect + 'static)>

Source§

fn try_as_reflect_mut(&mut self) -> Option<&mut (dyn Reflect + 'static)>

Source§

fn into_partial_reflect(self: Box<u8>) -> Box<dyn PartialReflect>

Source§

fn as_partial_reflect(&self) -> &(dyn PartialReflect + 'static)

Source§

fn as_partial_reflect_mut(&mut self) -> &mut (dyn PartialReflect + 'static)

Source§

fn reflect_hash(&self) -> Option<u64>

Source§

fn reflect_partial_eq( &self, value: &(dyn PartialReflect + 'static), ) -> Option<bool>

Source§

fn reflect_partial_cmp( &self, value: &(dyn PartialReflect + 'static), ) -> Option<Ordering>

Source§

fn debug(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Source§

fn reflect_clone(&self) -> Result<Box<dyn Reflect>, ReflectCloneError>

Source§

impl PartialReflect for u16

Source§

fn get_represented_type_info(&self) -> Option<&'static TypeInfo>

Source§

fn to_dynamic(&self) -> Box<dyn PartialReflect>

Source§

fn try_apply( &mut self, value: &(dyn PartialReflect + 'static), ) -> Result<(), ApplyError>

Source§

fn reflect_kind(&self) -> ReflectKind

Source§

fn reflect_ref(&self) -> ReflectRef<'_>

Source§

fn reflect_mut(&mut self) -> ReflectMut<'_>

Source§

fn reflect_owned(self: Box<u16>) -> ReflectOwned

Source§

fn try_into_reflect( self: Box<u16>, ) -> Result<Box<dyn Reflect>, Box<dyn PartialReflect>>

Source§

fn try_as_reflect(&self) -> Option<&(dyn Reflect + 'static)>

Source§

fn try_as_reflect_mut(&mut self) -> Option<&mut (dyn Reflect + 'static)>

Source§

fn into_partial_reflect(self: Box<u16>) -> Box<dyn PartialReflect>

Source§

fn as_partial_reflect(&self) -> &(dyn PartialReflect + 'static)

Source§

fn as_partial_reflect_mut(&mut self) -> &mut (dyn PartialReflect + 'static)

Source§

fn reflect_hash(&self) -> Option<u64>

Source§

fn reflect_partial_eq( &self, value: &(dyn PartialReflect + 'static), ) -> Option<bool>

Source§

fn reflect_partial_cmp( &self, value: &(dyn PartialReflect + 'static), ) -> Option<Ordering>

Source§

fn debug(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Source§

fn reflect_clone(&self) -> Result<Box<dyn Reflect>, ReflectCloneError>

Source§

impl PartialReflect for u32

Source§

fn get_represented_type_info(&self) -> Option<&'static TypeInfo>

Source§

fn to_dynamic(&self) -> Box<dyn PartialReflect>

Source§

fn try_apply( &mut self, value: &(dyn PartialReflect + 'static), ) -> Result<(), ApplyError>

Source§

fn reflect_kind(&self) -> ReflectKind

Source§

fn reflect_ref(&self) -> ReflectRef<'_>

Source§

fn reflect_mut(&mut self) -> ReflectMut<'_>

Source§

fn reflect_owned(self: Box<u32>) -> ReflectOwned

Source§

fn try_into_reflect( self: Box<u32>, ) -> Result<Box<dyn Reflect>, Box<dyn PartialReflect>>

Source§

fn try_as_reflect(&self) -> Option<&(dyn Reflect + 'static)>

Source§

fn try_as_reflect_mut(&mut self) -> Option<&mut (dyn Reflect + 'static)>

Source§

fn into_partial_reflect(self: Box<u32>) -> Box<dyn PartialReflect>

Source§

fn as_partial_reflect(&self) -> &(dyn PartialReflect + 'static)

Source§

fn as_partial_reflect_mut(&mut self) -> &mut (dyn PartialReflect + 'static)

Source§

fn reflect_hash(&self) -> Option<u64>

Source§

fn reflect_partial_eq( &self, value: &(dyn PartialReflect + 'static), ) -> Option<bool>

Source§

fn reflect_partial_cmp( &self, value: &(dyn PartialReflect + 'static), ) -> Option<Ordering>

Source§

fn debug(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Source§

fn reflect_clone(&self) -> Result<Box<dyn Reflect>, ReflectCloneError>

Source§

impl PartialReflect for u64

Source§

fn get_represented_type_info(&self) -> Option<&'static TypeInfo>

Source§

fn to_dynamic(&self) -> Box<dyn PartialReflect>

Source§

fn try_apply( &mut self, value: &(dyn PartialReflect + 'static), ) -> Result<(), ApplyError>

Source§

fn reflect_kind(&self) -> ReflectKind

Source§

fn reflect_ref(&self) -> ReflectRef<'_>

Source§

fn reflect_mut(&mut self) -> ReflectMut<'_>

Source§

fn reflect_owned(self: Box<u64>) -> ReflectOwned

Source§

fn try_into_reflect( self: Box<u64>, ) -> Result<Box<dyn Reflect>, Box<dyn PartialReflect>>

Source§

fn try_as_reflect(&self) -> Option<&(dyn Reflect + 'static)>

Source§

fn try_as_reflect_mut(&mut self) -> Option<&mut (dyn Reflect + 'static)>

Source§

fn into_partial_reflect(self: Box<u64>) -> Box<dyn PartialReflect>

Source§

fn as_partial_reflect(&self) -> &(dyn PartialReflect + 'static)

Source§

fn as_partial_reflect_mut(&mut self) -> &mut (dyn PartialReflect + 'static)

Source§

fn reflect_hash(&self) -> Option<u64>

Source§

fn reflect_partial_eq( &self, value: &(dyn PartialReflect + 'static), ) -> Option<bool>

Source§

fn reflect_partial_cmp( &self, value: &(dyn PartialReflect + 'static), ) -> Option<Ordering>

Source§

fn debug(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Source§

fn reflect_clone(&self) -> Result<Box<dyn Reflect>, ReflectCloneError>

Source§

impl PartialReflect for u128

Source§

fn get_represented_type_info(&self) -> Option<&'static TypeInfo>

Source§

fn to_dynamic(&self) -> Box<dyn PartialReflect>

Source§

fn try_apply( &mut self, value: &(dyn PartialReflect + 'static), ) -> Result<(), ApplyError>

Source§

fn reflect_kind(&self) -> ReflectKind

Source§

fn reflect_ref(&self) -> ReflectRef<'_>

Source§

fn reflect_mut(&mut self) -> ReflectMut<'_>

Source§

fn reflect_owned(self: Box<u128>) -> ReflectOwned

Source§

fn try_into_reflect( self: Box<u128>, ) -> Result<Box<dyn Reflect>, Box<dyn PartialReflect>>

Source§

fn try_as_reflect(&self) -> Option<&(dyn Reflect + 'static)>

Source§

fn try_as_reflect_mut(&mut self) -> Option<&mut (dyn Reflect + 'static)>

Source§

fn into_partial_reflect(self: Box<u128>) -> Box<dyn PartialReflect>

Source§

fn as_partial_reflect(&self) -> &(dyn PartialReflect + 'static)

Source§

fn as_partial_reflect_mut(&mut self) -> &mut (dyn PartialReflect + 'static)

Source§

fn reflect_hash(&self) -> Option<u64>

Source§

fn reflect_partial_eq( &self, value: &(dyn PartialReflect + 'static), ) -> Option<bool>

Source§

fn reflect_partial_cmp( &self, value: &(dyn PartialReflect + 'static), ) -> Option<Ordering>

Source§

fn debug(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Source§

fn reflect_clone(&self) -> Result<Box<dyn Reflect>, ReflectCloneError>

Source§

impl PartialReflect for usize

Source§

fn get_represented_type_info(&self) -> Option<&'static TypeInfo>

Source§

fn to_dynamic(&self) -> Box<dyn PartialReflect>

Source§

fn try_apply( &mut self, value: &(dyn PartialReflect + 'static), ) -> Result<(), ApplyError>

Source§

fn reflect_kind(&self) -> ReflectKind

Source§

fn reflect_ref(&self) -> ReflectRef<'_>

Source§

fn reflect_mut(&mut self) -> ReflectMut<'_>

Source§

fn reflect_owned(self: Box<usize>) -> ReflectOwned

Source§

fn try_into_reflect( self: Box<usize>, ) -> Result<Box<dyn Reflect>, Box<dyn PartialReflect>>

Source§

fn try_as_reflect(&self) -> Option<&(dyn Reflect + 'static)>

Source§

fn try_as_reflect_mut(&mut self) -> Option<&mut (dyn Reflect + 'static)>

Source§

fn into_partial_reflect(self: Box<usize>) -> Box<dyn PartialReflect>

Source§

fn as_partial_reflect(&self) -> &(dyn PartialReflect + 'static)

Source§

fn as_partial_reflect_mut(&mut self) -> &mut (dyn PartialReflect + 'static)

Source§

fn reflect_hash(&self) -> Option<u64>

Source§

fn reflect_partial_eq( &self, value: &(dyn PartialReflect + 'static), ) -> Option<bool>

Source§

fn reflect_partial_cmp( &self, value: &(dyn PartialReflect + 'static), ) -> Option<Ordering>

Source§

fn debug(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Source§

fn reflect_clone(&self) -> Result<Box<dyn Reflect>, ReflectCloneError>

Source§

impl<A, B, C, D, E, F, G, H, I, J, K, L> PartialReflect for (A, B, C, D, E, F, G, H, I, J, K, L)
where A: Reflect + MaybeTyped + TypePath + GetTypeRegistration, B: Reflect + MaybeTyped + TypePath + GetTypeRegistration, C: Reflect + MaybeTyped + TypePath + GetTypeRegistration, D: Reflect + MaybeTyped + TypePath + GetTypeRegistration, E: Reflect + MaybeTyped + TypePath + GetTypeRegistration, F: Reflect + MaybeTyped + TypePath + GetTypeRegistration, G: Reflect + MaybeTyped + TypePath + GetTypeRegistration, H: Reflect + MaybeTyped + TypePath + GetTypeRegistration, I: Reflect + MaybeTyped + TypePath + GetTypeRegistration, J: Reflect + MaybeTyped + TypePath + GetTypeRegistration, K: Reflect + MaybeTyped + TypePath + GetTypeRegistration, L: Reflect + MaybeTyped + TypePath + GetTypeRegistration,

Source§

impl<A, B, C, D, E, F, G, H, I, J, K> PartialReflect for (A, B, C, D, E, F, G, H, I, J, K)
where A: Reflect + MaybeTyped + TypePath + GetTypeRegistration, B: Reflect + MaybeTyped + TypePath + GetTypeRegistration, C: Reflect + MaybeTyped + TypePath + GetTypeRegistration, D: Reflect + MaybeTyped + TypePath + GetTypeRegistration, E: Reflect + MaybeTyped + TypePath + GetTypeRegistration, F: Reflect + MaybeTyped + TypePath + GetTypeRegistration, G: Reflect + MaybeTyped + TypePath + GetTypeRegistration, H: Reflect + MaybeTyped + TypePath + GetTypeRegistration, I: Reflect + MaybeTyped + TypePath + GetTypeRegistration, J: Reflect + MaybeTyped + TypePath + GetTypeRegistration, K: Reflect + MaybeTyped + TypePath + GetTypeRegistration,

Source§

impl<A, B, C, D, E, F, G, H, I, J> PartialReflect for (A, B, C, D, E, F, G, H, I, J)
where A: Reflect + MaybeTyped + TypePath + GetTypeRegistration, B: Reflect + MaybeTyped + TypePath + GetTypeRegistration, C: Reflect + MaybeTyped + TypePath + GetTypeRegistration, D: Reflect + MaybeTyped + TypePath + GetTypeRegistration, E: Reflect + MaybeTyped + TypePath + GetTypeRegistration, F: Reflect + MaybeTyped + TypePath + GetTypeRegistration, G: Reflect + MaybeTyped + TypePath + GetTypeRegistration, H: Reflect + MaybeTyped + TypePath + GetTypeRegistration, I: Reflect + MaybeTyped + TypePath + GetTypeRegistration, J: Reflect + MaybeTyped + TypePath + GetTypeRegistration,

Source§

impl<A, B, C, D, E, F, G, H, I> PartialReflect for (A, B, C, D, E, F, G, H, I)
where A: Reflect + MaybeTyped + TypePath + GetTypeRegistration, B: Reflect + MaybeTyped + TypePath + GetTypeRegistration, C: Reflect + MaybeTyped + TypePath + GetTypeRegistration, D: Reflect + MaybeTyped + TypePath + GetTypeRegistration, E: Reflect + MaybeTyped + TypePath + GetTypeRegistration, F: Reflect + MaybeTyped + TypePath + GetTypeRegistration, G: Reflect + MaybeTyped + TypePath + GetTypeRegistration, H: Reflect + MaybeTyped + TypePath + GetTypeRegistration, I: Reflect + MaybeTyped + TypePath + GetTypeRegistration,

Source§

fn get_represented_type_info(&self) -> Option<&'static TypeInfo>

Source§

fn into_partial_reflect( self: Box<(A, B, C, D, E, F, G, H, I)>, ) -> Box<dyn PartialReflect>

Source§

fn as_partial_reflect(&self) -> &(dyn PartialReflect + 'static)

Source§

fn as_partial_reflect_mut(&mut self) -> &mut (dyn PartialReflect + 'static)

Source§

fn try_into_reflect( self: Box<(A, B, C, D, E, F, G, H, I)>, ) -> Result<Box<dyn Reflect>, Box<dyn PartialReflect>>

Source§

fn try_as_reflect(&self) -> Option<&(dyn Reflect + 'static)>

Source§

fn try_as_reflect_mut(&mut self) -> Option<&mut (dyn Reflect + 'static)>

Source§

fn reflect_kind(&self) -> ReflectKind

Source§

fn reflect_ref(&self) -> ReflectRef<'_>

Source§

fn reflect_mut(&mut self) -> ReflectMut<'_>

Source§

fn reflect_owned(self: Box<(A, B, C, D, E, F, G, H, I)>) -> ReflectOwned

Source§

fn reflect_partial_eq( &self, value: &(dyn PartialReflect + 'static), ) -> Option<bool>

Source§

fn reflect_partial_cmp( &self, value: &(dyn PartialReflect + 'static), ) -> Option<Ordering>

Source§

fn apply(&mut self, value: &(dyn PartialReflect + 'static))

Source§

fn try_apply( &mut self, value: &(dyn PartialReflect + 'static), ) -> Result<(), ApplyError>

Source§

fn reflect_clone(&self) -> Result<Box<dyn Reflect>, ReflectCloneError>

Source§

impl<A, B, C, D, E, F, G, H> PartialReflect for (A, B, C, D, E, F, G, H)
where A: Reflect + MaybeTyped + TypePath + GetTypeRegistration, B: Reflect + MaybeTyped + TypePath + GetTypeRegistration, C: Reflect + MaybeTyped + TypePath + GetTypeRegistration, D: Reflect + MaybeTyped + TypePath + GetTypeRegistration, E: Reflect + MaybeTyped + TypePath + GetTypeRegistration, F: Reflect + MaybeTyped + TypePath + GetTypeRegistration, G: Reflect + MaybeTyped + TypePath + GetTypeRegistration, H: Reflect + MaybeTyped + TypePath + GetTypeRegistration,

Source§

fn get_represented_type_info(&self) -> Option<&'static TypeInfo>

Source§

fn into_partial_reflect( self: Box<(A, B, C, D, E, F, G, H)>, ) -> Box<dyn PartialReflect>

Source§

fn as_partial_reflect(&self) -> &(dyn PartialReflect + 'static)

Source§

fn as_partial_reflect_mut(&mut self) -> &mut (dyn PartialReflect + 'static)

Source§

fn try_into_reflect( self: Box<(A, B, C, D, E, F, G, H)>, ) -> Result<Box<dyn Reflect>, Box<dyn PartialReflect>>

Source§

fn try_as_reflect(&self) -> Option<&(dyn Reflect + 'static)>

Source§

fn try_as_reflect_mut(&mut self) -> Option<&mut (dyn Reflect + 'static)>

Source§

fn reflect_kind(&self) -> ReflectKind

Source§

fn reflect_ref(&self) -> ReflectRef<'_>

Source§

fn reflect_mut(&mut self) -> ReflectMut<'_>

Source§

fn reflect_owned(self: Box<(A, B, C, D, E, F, G, H)>) -> ReflectOwned

Source§

fn reflect_partial_eq( &self, value: &(dyn PartialReflect + 'static), ) -> Option<bool>

Source§

fn reflect_partial_cmp( &self, value: &(dyn PartialReflect + 'static), ) -> Option<Ordering>

Source§

fn apply(&mut self, value: &(dyn PartialReflect + 'static))

Source§

fn try_apply( &mut self, value: &(dyn PartialReflect + 'static), ) -> Result<(), ApplyError>

Source§

fn reflect_clone(&self) -> Result<Box<dyn Reflect>, ReflectCloneError>

Source§

impl<A, B, C, D, E, F, G> PartialReflect for (A, B, C, D, E, F, G)
where A: Reflect + MaybeTyped + TypePath + GetTypeRegistration, B: Reflect + MaybeTyped + TypePath + GetTypeRegistration, C: Reflect + MaybeTyped + TypePath + GetTypeRegistration, D: Reflect + MaybeTyped + TypePath + GetTypeRegistration, E: Reflect + MaybeTyped + TypePath + GetTypeRegistration, F: Reflect + MaybeTyped + TypePath + GetTypeRegistration, G: Reflect + MaybeTyped + TypePath + GetTypeRegistration,

Source§

fn get_represented_type_info(&self) -> Option<&'static TypeInfo>

Source§

fn into_partial_reflect( self: Box<(A, B, C, D, E, F, G)>, ) -> Box<dyn PartialReflect>

Source§

fn as_partial_reflect(&self) -> &(dyn PartialReflect + 'static)

Source§

fn as_partial_reflect_mut(&mut self) -> &mut (dyn PartialReflect + 'static)

Source§

fn try_into_reflect( self: Box<(A, B, C, D, E, F, G)>, ) -> Result<Box<dyn Reflect>, Box<dyn PartialReflect>>

Source§

fn try_as_reflect(&self) -> Option<&(dyn Reflect + 'static)>

Source§

fn try_as_reflect_mut(&mut self) -> Option<&mut (dyn Reflect + 'static)>

Source§

fn reflect_kind(&self) -> ReflectKind

Source§

fn reflect_ref(&self) -> ReflectRef<'_>

Source§

fn reflect_mut(&mut self) -> ReflectMut<'_>

Source§

fn reflect_owned(self: Box<(A, B, C, D, E, F, G)>) -> ReflectOwned

Source§

fn reflect_partial_eq( &self, value: &(dyn PartialReflect + 'static), ) -> Option<bool>

Source§

fn reflect_partial_cmp( &self, value: &(dyn PartialReflect + 'static), ) -> Option<Ordering>

Source§

fn apply(&mut self, value: &(dyn PartialReflect + 'static))

Source§

fn try_apply( &mut self, value: &(dyn PartialReflect + 'static), ) -> Result<(), ApplyError>

Source§

fn reflect_clone(&self) -> Result<Box<dyn Reflect>, ReflectCloneError>

Source§

impl<A, B, C, D, E, F> PartialReflect for (A, B, C, D, E, F)
where A: Reflect + MaybeTyped + TypePath + GetTypeRegistration, B: Reflect + MaybeTyped + TypePath + GetTypeRegistration, C: Reflect + MaybeTyped + TypePath + GetTypeRegistration, D: Reflect + MaybeTyped + TypePath + GetTypeRegistration, E: Reflect + MaybeTyped + TypePath + GetTypeRegistration, F: Reflect + MaybeTyped + TypePath + GetTypeRegistration,

Source§

fn get_represented_type_info(&self) -> Option<&'static TypeInfo>

Source§

fn into_partial_reflect( self: Box<(A, B, C, D, E, F)>, ) -> Box<dyn PartialReflect>

Source§

fn as_partial_reflect(&self) -> &(dyn PartialReflect + 'static)

Source§

fn as_partial_reflect_mut(&mut self) -> &mut (dyn PartialReflect + 'static)

Source§

fn try_into_reflect( self: Box<(A, B, C, D, E, F)>, ) -> Result<Box<dyn Reflect>, Box<dyn PartialReflect>>

Source§

fn try_as_reflect(&self) -> Option<&(dyn Reflect + 'static)>

Source§

fn try_as_reflect_mut(&mut self) -> Option<&mut (dyn Reflect + 'static)>

Source§

fn reflect_kind(&self) -> ReflectKind

Source§

fn reflect_ref(&self) -> ReflectRef<'_>

Source§

fn reflect_mut(&mut self) -> ReflectMut<'_>

Source§

fn reflect_owned(self: Box<(A, B, C, D, E, F)>) -> ReflectOwned

Source§

fn reflect_partial_eq( &self, value: &(dyn PartialReflect + 'static), ) -> Option<bool>

Source§

fn reflect_partial_cmp( &self, value: &(dyn PartialReflect + 'static), ) -> Option<Ordering>

Source§

fn apply(&mut self, value: &(dyn PartialReflect + 'static))

Source§

fn try_apply( &mut self, value: &(dyn PartialReflect + 'static), ) -> Result<(), ApplyError>

Source§

fn reflect_clone(&self) -> Result<Box<dyn Reflect>, ReflectCloneError>

Source§

impl<A, B, C, D, E> PartialReflect for (A, B, C, D, E)
where A: Reflect + MaybeTyped + TypePath + GetTypeRegistration, B: Reflect + MaybeTyped + TypePath + GetTypeRegistration, C: Reflect + MaybeTyped + TypePath + GetTypeRegistration, D: Reflect + MaybeTyped + TypePath + GetTypeRegistration, E: Reflect + MaybeTyped + TypePath + GetTypeRegistration,

Source§

fn get_represented_type_info(&self) -> Option<&'static TypeInfo>

Source§

fn into_partial_reflect(self: Box<(A, B, C, D, E)>) -> Box<dyn PartialReflect>

Source§

fn as_partial_reflect(&self) -> &(dyn PartialReflect + 'static)

Source§

fn as_partial_reflect_mut(&mut self) -> &mut (dyn PartialReflect + 'static)

Source§

fn try_into_reflect( self: Box<(A, B, C, D, E)>, ) -> Result<Box<dyn Reflect>, Box<dyn PartialReflect>>

Source§

fn try_as_reflect(&self) -> Option<&(dyn Reflect + 'static)>

Source§

fn try_as_reflect_mut(&mut self) -> Option<&mut (dyn Reflect + 'static)>

Source§

fn reflect_kind(&self) -> ReflectKind

Source§

fn reflect_ref(&self) -> ReflectRef<'_>

Source§

fn reflect_mut(&mut self) -> ReflectMut<'_>

Source§

fn reflect_owned(self: Box<(A, B, C, D, E)>) -> ReflectOwned

Source§

fn reflect_partial_eq( &self, value: &(dyn PartialReflect + 'static), ) -> Option<bool>

Source§

fn reflect_partial_cmp( &self, value: &(dyn PartialReflect + 'static), ) -> Option<Ordering>

Source§

fn apply(&mut self, value: &(dyn PartialReflect + 'static))

Source§

fn try_apply( &mut self, value: &(dyn PartialReflect + 'static), ) -> Result<(), ApplyError>

Source§

fn reflect_clone(&self) -> Result<Box<dyn Reflect>, ReflectCloneError>

Source§

impl<A, B, C, D> PartialReflect for (A, B, C, D)
where A: Reflect + MaybeTyped + TypePath + GetTypeRegistration, B: Reflect + MaybeTyped + TypePath + GetTypeRegistration, C: Reflect + MaybeTyped + TypePath + GetTypeRegistration, D: Reflect + MaybeTyped + TypePath + GetTypeRegistration,

Source§

fn get_represented_type_info(&self) -> Option<&'static TypeInfo>

Source§

fn into_partial_reflect(self: Box<(A, B, C, D)>) -> Box<dyn PartialReflect>

Source§

fn as_partial_reflect(&self) -> &(dyn PartialReflect + 'static)

Source§

fn as_partial_reflect_mut(&mut self) -> &mut (dyn PartialReflect + 'static)

Source§

fn try_into_reflect( self: Box<(A, B, C, D)>, ) -> Result<Box<dyn Reflect>, Box<dyn PartialReflect>>

Source§

fn try_as_reflect(&self) -> Option<&(dyn Reflect + 'static)>

Source§

fn try_as_reflect_mut(&mut self) -> Option<&mut (dyn Reflect + 'static)>

Source§

fn reflect_kind(&self) -> ReflectKind

Source§

fn reflect_ref(&self) -> ReflectRef<'_>

Source§

fn reflect_mut(&mut self) -> ReflectMut<'_>

Source§

fn reflect_owned(self: Box<(A, B, C, D)>) -> ReflectOwned

Source§

fn reflect_partial_eq( &self, value: &(dyn PartialReflect + 'static), ) -> Option<bool>

Source§

fn reflect_partial_cmp( &self, value: &(dyn PartialReflect + 'static), ) -> Option<Ordering>

Source§

fn apply(&mut self, value: &(dyn PartialReflect + 'static))

Source§

fn try_apply( &mut self, value: &(dyn PartialReflect + 'static), ) -> Result<(), ApplyError>

Source§

fn reflect_clone(&self) -> Result<Box<dyn Reflect>, ReflectCloneError>

Source§

impl<A, B, C> PartialReflect for (A, B, C)
where A: Reflect + MaybeTyped + TypePath + GetTypeRegistration, B: Reflect + MaybeTyped + TypePath + GetTypeRegistration, C: Reflect + MaybeTyped + TypePath + GetTypeRegistration,

Source§

fn get_represented_type_info(&self) -> Option<&'static TypeInfo>

Source§

fn into_partial_reflect(self: Box<(A, B, C)>) -> Box<dyn PartialReflect>

Source§

fn as_partial_reflect(&self) -> &(dyn PartialReflect + 'static)

Source§

fn as_partial_reflect_mut(&mut self) -> &mut (dyn PartialReflect + 'static)

Source§

fn try_into_reflect( self: Box<(A, B, C)>, ) -> Result<Box<dyn Reflect>, Box<dyn PartialReflect>>

Source§

fn try_as_reflect(&self) -> Option<&(dyn Reflect + 'static)>

Source§

fn try_as_reflect_mut(&mut self) -> Option<&mut (dyn Reflect + 'static)>

Source§

fn reflect_kind(&self) -> ReflectKind

Source§

fn reflect_ref(&self) -> ReflectRef<'_>

Source§

fn reflect_mut(&mut self) -> ReflectMut<'_>

Source§

fn reflect_owned(self: Box<(A, B, C)>) -> ReflectOwned

Source§

fn reflect_partial_eq( &self, value: &(dyn PartialReflect + 'static), ) -> Option<bool>

Source§

fn reflect_partial_cmp( &self, value: &(dyn PartialReflect + 'static), ) -> Option<Ordering>

Source§

fn apply(&mut self, value: &(dyn PartialReflect + 'static))

Source§

fn try_apply( &mut self, value: &(dyn PartialReflect + 'static), ) -> Result<(), ApplyError>

Source§

fn reflect_clone(&self) -> Result<Box<dyn Reflect>, ReflectCloneError>

Source§

impl<A, B> PartialReflect for (A, B)
where A: Reflect + MaybeTyped + TypePath + GetTypeRegistration, B: Reflect + MaybeTyped + TypePath + GetTypeRegistration,

Source§

fn get_represented_type_info(&self) -> Option<&'static TypeInfo>

Source§

fn into_partial_reflect(self: Box<(A, B)>) -> Box<dyn PartialReflect>

Source§

fn as_partial_reflect(&self) -> &(dyn PartialReflect + 'static)

Source§

fn as_partial_reflect_mut(&mut self) -> &mut (dyn PartialReflect + 'static)

Source§

fn try_into_reflect( self: Box<(A, B)>, ) -> Result<Box<dyn Reflect>, Box<dyn PartialReflect>>

Source§

fn try_as_reflect(&self) -> Option<&(dyn Reflect + 'static)>

Source§

fn try_as_reflect_mut(&mut self) -> Option<&mut (dyn Reflect + 'static)>

Source§

fn reflect_kind(&self) -> ReflectKind

Source§

fn reflect_ref(&self) -> ReflectRef<'_>

Source§

fn reflect_mut(&mut self) -> ReflectMut<'_>

Source§

fn reflect_owned(self: Box<(A, B)>) -> ReflectOwned

Source§

fn reflect_partial_eq( &self, value: &(dyn PartialReflect + 'static), ) -> Option<bool>

Source§

fn reflect_partial_cmp( &self, value: &(dyn PartialReflect + 'static), ) -> Option<Ordering>

Source§

fn apply(&mut self, value: &(dyn PartialReflect + 'static))

Source§

fn try_apply( &mut self, value: &(dyn PartialReflect + 'static), ) -> Result<(), ApplyError>

Source§

fn reflect_clone(&self) -> Result<Box<dyn Reflect>, ReflectCloneError>

Source§

impl<A> PartialReflect for (A,)
where A: Reflect + MaybeTyped + TypePath + GetTypeRegistration,

Source§

fn get_represented_type_info(&self) -> Option<&'static TypeInfo>

Source§

fn into_partial_reflect(self: Box<(A,)>) -> Box<dyn PartialReflect>

Source§

fn as_partial_reflect(&self) -> &(dyn PartialReflect + 'static)

Source§

fn as_partial_reflect_mut(&mut self) -> &mut (dyn PartialReflect + 'static)

Source§

fn try_into_reflect( self: Box<(A,)>, ) -> Result<Box<dyn Reflect>, Box<dyn PartialReflect>>

Source§

fn try_as_reflect(&self) -> Option<&(dyn Reflect + 'static)>

Source§

fn try_as_reflect_mut(&mut self) -> Option<&mut (dyn Reflect + 'static)>

Source§

fn reflect_kind(&self) -> ReflectKind

Source§

fn reflect_ref(&self) -> ReflectRef<'_>

Source§

fn reflect_mut(&mut self) -> ReflectMut<'_>

Source§

fn reflect_owned(self: Box<(A,)>) -> ReflectOwned

Source§

fn reflect_partial_eq( &self, value: &(dyn PartialReflect + 'static), ) -> Option<bool>

Source§

fn reflect_partial_cmp( &self, value: &(dyn PartialReflect + 'static), ) -> Option<Ordering>

Source§

fn apply(&mut self, value: &(dyn PartialReflect + 'static))

Source§

fn try_apply( &mut self, value: &(dyn PartialReflect + 'static), ) -> Result<(), ApplyError>

Source§

fn reflect_clone(&self) -> Result<Box<dyn Reflect>, ReflectCloneError>

Source§

impl<K, V, S> PartialReflect for HashMap<K, V, S>

Source§

fn get_represented_type_info(&self) -> Option<&'static TypeInfo>

Source§

fn into_partial_reflect(self: Box<HashMap<K, V, S>>) -> Box<dyn PartialReflect>

Source§

fn as_partial_reflect(&self) -> &(dyn PartialReflect + 'static)

Source§

fn as_partial_reflect_mut(&mut self) -> &mut (dyn PartialReflect + 'static)

Source§

fn try_into_reflect( self: Box<HashMap<K, V, S>>, ) -> Result<Box<dyn Reflect>, Box<dyn PartialReflect>>

Source§

fn try_as_reflect(&self) -> Option<&(dyn Reflect + 'static)>

Source§

fn try_as_reflect_mut(&mut self) -> Option<&mut (dyn Reflect + 'static)>

Source§

fn reflect_kind(&self) -> ReflectKind

Source§

fn reflect_ref(&self) -> ReflectRef<'_>

Source§

fn reflect_mut(&mut self) -> ReflectMut<'_>

Source§

fn reflect_owned(self: Box<HashMap<K, V, S>>) -> ReflectOwned

Source§

fn reflect_clone(&self) -> Result<Box<dyn Reflect>, ReflectCloneError>

Source§

fn reflect_partial_eq( &self, value: &(dyn PartialReflect + 'static), ) -> Option<bool>

Source§

fn apply(&mut self, value: &(dyn PartialReflect + 'static))

Source§

fn try_apply( &mut self, value: &(dyn PartialReflect + 'static), ) -> Result<(), ApplyError>

Source§

impl<K, V, S> PartialReflect for IndexMap<K, V, S>

Source§

fn get_represented_type_info(&self) -> Option<&'static TypeInfo>

Source§

fn into_partial_reflect(self: Box<IndexMap<K, V, S>>) -> Box<dyn PartialReflect>

Source§

fn as_partial_reflect(&self) -> &(dyn PartialReflect + 'static)

Source§

fn as_partial_reflect_mut(&mut self) -> &mut (dyn PartialReflect + 'static)

Source§

fn try_into_reflect( self: Box<IndexMap<K, V, S>>, ) -> Result<Box<dyn Reflect>, Box<dyn PartialReflect>>

Source§

fn try_as_reflect(&self) -> Option<&(dyn Reflect + 'static)>

Source§

fn try_as_reflect_mut(&mut self) -> Option<&mut (dyn Reflect + 'static)>

Source§

fn apply(&mut self, value: &(dyn PartialReflect + 'static))

Source§

fn try_apply( &mut self, value: &(dyn PartialReflect + 'static), ) -> Result<(), ApplyError>

Source§

fn reflect_kind(&self) -> ReflectKind

Source§

fn reflect_ref(&self) -> ReflectRef<'_>

Source§

fn reflect_mut(&mut self) -> ReflectMut<'_>

Source§

fn reflect_owned(self: Box<IndexMap<K, V, S>>) -> ReflectOwned

Source§

fn reflect_clone(&self) -> Result<Box<dyn Reflect>, ReflectCloneError>

Source§

fn reflect_partial_eq( &self, value: &(dyn PartialReflect + 'static), ) -> Option<bool>

Source§

impl<K, V> PartialReflect for BTreeMap<K, V>
where K: FromReflect + MaybeTyped + TypePath + GetTypeRegistration + Eq + Ord, V: FromReflect + MaybeTyped + TypePath + GetTypeRegistration,

Source§

fn get_represented_type_info(&self) -> Option<&'static TypeInfo>

Source§

fn into_partial_reflect(self: Box<BTreeMap<K, V>>) -> Box<dyn PartialReflect>

Source§

fn as_partial_reflect(&self) -> &(dyn PartialReflect + 'static)

Source§

fn as_partial_reflect_mut(&mut self) -> &mut (dyn PartialReflect + 'static)

Source§

fn try_into_reflect( self: Box<BTreeMap<K, V>>, ) -> Result<Box<dyn Reflect>, Box<dyn PartialReflect>>

Source§

fn try_as_reflect(&self) -> Option<&(dyn Reflect + 'static)>

Source§

fn try_as_reflect_mut(&mut self) -> Option<&mut (dyn Reflect + 'static)>

Source§

fn reflect_kind(&self) -> ReflectKind

Source§

fn reflect_ref(&self) -> ReflectRef<'_>

Source§

fn reflect_mut(&mut self) -> ReflectMut<'_>

Source§

fn reflect_owned(self: Box<BTreeMap<K, V>>) -> ReflectOwned

Source§

fn reflect_clone(&self) -> Result<Box<dyn Reflect>, ReflectCloneError>

Source§

fn reflect_partial_eq( &self, value: &(dyn PartialReflect + 'static), ) -> Option<bool>

Source§

fn reflect_partial_cmp( &self, value: &(dyn PartialReflect + 'static), ) -> Option<Ordering>

Source§

fn apply(&mut self, value: &(dyn PartialReflect + 'static))

Source§

fn try_apply( &mut self, value: &(dyn PartialReflect + 'static), ) -> Result<(), ApplyError>

Source§

impl<N, E, Ix> PartialReflect for Graph<N, E, Directed, Ix>
where N: Clone + TypePath, E: Clone + TypePath, Ix: IndexType + TypePath, Graph<N, E, Directed, Ix>: Any + Send + Sync,

Source§

fn get_represented_type_info(&self) -> Option<&'static TypeInfo>

Source§

fn to_dynamic(&self) -> Box<dyn PartialReflect>

Source§

fn try_apply( &mut self, value: &(dyn PartialReflect + 'static), ) -> Result<(), ApplyError>

Source§

fn reflect_kind(&self) -> ReflectKind

Source§

fn reflect_ref(&self) -> ReflectRef<'_>

Source§

fn reflect_mut(&mut self) -> ReflectMut<'_>

Source§

fn reflect_owned(self: Box<Graph<N, E, Directed, Ix>>) -> ReflectOwned

Source§

fn try_into_reflect( self: Box<Graph<N, E, Directed, Ix>>, ) -> Result<Box<dyn Reflect>, Box<dyn PartialReflect>>

Source§

fn try_as_reflect(&self) -> Option<&(dyn Reflect + 'static)>

Source§

fn try_as_reflect_mut(&mut self) -> Option<&mut (dyn Reflect + 'static)>

Source§

fn into_partial_reflect( self: Box<Graph<N, E, Directed, Ix>>, ) -> Box<dyn PartialReflect>

Source§

fn as_partial_reflect(&self) -> &(dyn PartialReflect + 'static)

Source§

fn as_partial_reflect_mut(&mut self) -> &mut (dyn PartialReflect + 'static)

Source§

fn reflect_clone(&self) -> Result<Box<dyn Reflect>, ReflectCloneError>

Source§

impl<T, E> PartialReflect for Result<T, E>
where Result<T, E>: Any + Send + Sync, T: TypePath + FromReflect + MaybeTyped + RegisterForReflection, E: TypePath + FromReflect + MaybeTyped + RegisterForReflection,

Source§

fn get_represented_type_info(&self) -> Option<&'static TypeInfo>

Source§

fn try_apply( &mut self, __value_param: &(dyn PartialReflect + 'static), ) -> Result<(), ApplyError>

Source§

fn reflect_kind(&self) -> ReflectKind

Source§

fn reflect_ref(&self) -> ReflectRef<'_>

Source§

fn reflect_mut(&mut self) -> ReflectMut<'_>

Source§

fn reflect_owned(self: Box<Result<T, E>>) -> ReflectOwned

Source§

fn try_into_reflect( self: Box<Result<T, E>>, ) -> Result<Box<dyn Reflect>, Box<dyn PartialReflect>>

Source§

fn try_as_reflect(&self) -> Option<&(dyn Reflect + 'static)>

Source§

fn try_as_reflect_mut(&mut self) -> Option<&mut (dyn Reflect + 'static)>

Source§

fn into_partial_reflect(self: Box<Result<T, E>>) -> Box<dyn PartialReflect>

Source§

fn as_partial_reflect(&self) -> &(dyn PartialReflect + 'static)

Source§

fn as_partial_reflect_mut(&mut self) -> &mut (dyn PartialReflect + 'static)

Source§

fn reflect_hash(&self) -> Option<u64>

Source§

fn reflect_partial_eq( &self, value: &(dyn PartialReflect + 'static), ) -> Option<bool>

Source§

fn reflect_partial_cmp( &self, value: &(dyn PartialReflect + 'static), ) -> Option<Ordering>

Source§

fn reflect_clone(&self) -> Result<Box<dyn Reflect>, ReflectCloneError>

Source§

impl<T, S> PartialReflect for IndexSet<T, S>

Source§

fn get_represented_type_info(&self) -> Option<&'static TypeInfo>

Source§

fn into_partial_reflect(self: Box<IndexSet<T, S>>) -> Box<dyn PartialReflect>

Source§

fn as_partial_reflect(&self) -> &(dyn PartialReflect + 'static)

Source§

fn as_partial_reflect_mut(&mut self) -> &mut (dyn PartialReflect + 'static)

Source§

fn try_into_reflect( self: Box<IndexSet<T, S>>, ) -> Result<Box<dyn Reflect>, Box<dyn PartialReflect>>

Source§

fn try_as_reflect(&self) -> Option<&(dyn Reflect + 'static)>

Source§

fn try_as_reflect_mut(&mut self) -> Option<&mut (dyn Reflect + 'static)>

Source§

fn apply(&mut self, value: &(dyn PartialReflect + 'static))

Source§

fn try_apply( &mut self, value: &(dyn PartialReflect + 'static), ) -> Result<(), ApplyError>

Source§

fn reflect_kind(&self) -> ReflectKind

Source§

fn reflect_ref(&self) -> ReflectRef<'_>

Source§

fn reflect_mut(&mut self) -> ReflectMut<'_>

Source§

fn reflect_owned(self: Box<IndexSet<T, S>>) -> ReflectOwned

Source§

fn reflect_clone(&self) -> Result<Box<dyn Reflect>, ReflectCloneError>

Source§

fn reflect_partial_eq( &self, value: &(dyn PartialReflect + 'static), ) -> Option<bool>

Source§

impl<T, const N: usize> PartialReflect for [T; N]
where T: Reflect + MaybeTyped + TypePath + GetTypeRegistration,

Source§

fn get_represented_type_info(&self) -> Option<&'static TypeInfo>

Source§

fn into_partial_reflect(self: Box<[T; N]>) -> Box<dyn PartialReflect>

Source§

fn as_partial_reflect(&self) -> &(dyn PartialReflect + 'static)

Source§

fn as_partial_reflect_mut(&mut self) -> &mut (dyn PartialReflect + 'static)

Source§

fn try_into_reflect( self: Box<[T; N]>, ) -> Result<Box<dyn Reflect>, Box<dyn PartialReflect>>

Source§

fn try_as_reflect(&self) -> Option<&(dyn Reflect + 'static)>

Source§

fn try_as_reflect_mut(&mut self) -> Option<&mut (dyn Reflect + 'static)>

Source§

fn reflect_kind(&self) -> ReflectKind

Source§

fn reflect_ref(&self) -> ReflectRef<'_>

Source§

fn reflect_mut(&mut self) -> ReflectMut<'_>

Source§

fn reflect_owned(self: Box<[T; N]>) -> ReflectOwned

Source§

fn reflect_hash(&self) -> Option<u64>

Source§

fn reflect_partial_eq( &self, value: &(dyn PartialReflect + 'static), ) -> Option<bool>

Source§

fn reflect_partial_cmp( &self, value: &(dyn PartialReflect + 'static), ) -> Option<Ordering>

Source§

fn apply(&mut self, value: &(dyn PartialReflect + 'static))

Source§

fn try_apply( &mut self, value: &(dyn PartialReflect + 'static), ) -> Result<(), ApplyError>

Source§

impl<T> PartialReflect for BTreeSet<T>
where T: Ord + Eq + Clone + Send + Sync + TypePath, BTreeSet<T>: Any + Send + Sync,

Source§

fn get_represented_type_info(&self) -> Option<&'static TypeInfo>

Source§

fn to_dynamic(&self) -> Box<dyn PartialReflect>

Source§

fn try_apply( &mut self, value: &(dyn PartialReflect + 'static), ) -> Result<(), ApplyError>

Source§

fn reflect_kind(&self) -> ReflectKind

Source§

fn reflect_ref(&self) -> ReflectRef<'_>

Source§

fn reflect_mut(&mut self) -> ReflectMut<'_>

Source§

fn reflect_owned(self: Box<BTreeSet<T>>) -> ReflectOwned

Source§

fn try_into_reflect( self: Box<BTreeSet<T>>, ) -> Result<Box<dyn Reflect>, Box<dyn PartialReflect>>

Source§

fn try_as_reflect(&self) -> Option<&(dyn Reflect + 'static)>

Source§

fn try_as_reflect_mut(&mut self) -> Option<&mut (dyn Reflect + 'static)>

Source§

fn into_partial_reflect(self: Box<BTreeSet<T>>) -> Box<dyn PartialReflect>

Source§

fn as_partial_reflect(&self) -> &(dyn PartialReflect + 'static)

Source§

fn as_partial_reflect_mut(&mut self) -> &mut (dyn PartialReflect + 'static)

Source§

fn reflect_clone(&self) -> Result<Box<dyn Reflect>, ReflectCloneError>

Source§

impl<T> PartialReflect for BinaryHeap<T>
where T: Clone + TypePath, BinaryHeap<T>: Any + Send + Sync,

Source§

impl<T> PartialReflect for Bound<T>
where T: Clone + Send + Sync + TypePath, Bound<T>: Any + Send + Sync,

Source§

fn get_represented_type_info(&self) -> Option<&'static TypeInfo>

Source§

fn to_dynamic(&self) -> Box<dyn PartialReflect>

Source§

fn try_apply( &mut self, value: &(dyn PartialReflect + 'static), ) -> Result<(), ApplyError>

Source§

fn reflect_kind(&self) -> ReflectKind

Source§

fn reflect_ref(&self) -> ReflectRef<'_>

Source§

fn reflect_mut(&mut self) -> ReflectMut<'_>

Source§

fn reflect_owned(self: Box<Bound<T>>) -> ReflectOwned

Source§

fn try_into_reflect( self: Box<Bound<T>>, ) -> Result<Box<dyn Reflect>, Box<dyn PartialReflect>>

Source§

fn try_as_reflect(&self) -> Option<&(dyn Reflect + 'static)>

Source§

fn try_as_reflect_mut(&mut self) -> Option<&mut (dyn Reflect + 'static)>

Source§

fn into_partial_reflect(self: Box<Bound<T>>) -> Box<dyn PartialReflect>

Source§

fn as_partial_reflect(&self) -> &(dyn PartialReflect + 'static)

Source§

fn as_partial_reflect_mut(&mut self) -> &mut (dyn PartialReflect + 'static)

Source§

fn reflect_clone(&self) -> Result<Box<dyn Reflect>, ReflectCloneError>

Source§

impl<T> PartialReflect for Cow<'static, [T]>
where T: FromReflect + MaybeTyped + Clone + TypePath + GetTypeRegistration,

Source§

fn get_represented_type_info(&self) -> Option<&'static TypeInfo>

Source§

fn into_partial_reflect(self: Box<Cow<'static, [T]>>) -> Box<dyn PartialReflect>

Source§

fn as_partial_reflect(&self) -> &(dyn PartialReflect + 'static)

Source§

fn as_partial_reflect_mut(&mut self) -> &mut (dyn PartialReflect + 'static)

Source§

fn try_into_reflect( self: Box<Cow<'static, [T]>>, ) -> Result<Box<dyn Reflect>, Box<dyn PartialReflect>>

Source§

fn try_as_reflect(&self) -> Option<&(dyn Reflect + 'static)>

Source§

fn try_as_reflect_mut(&mut self) -> Option<&mut (dyn Reflect + 'static)>

Source§

fn reflect_kind(&self) -> ReflectKind

Source§

fn reflect_ref(&self) -> ReflectRef<'_>

Source§

fn reflect_mut(&mut self) -> ReflectMut<'_>

Source§

fn reflect_owned(self: Box<Cow<'static, [T]>>) -> ReflectOwned

Source§

fn reflect_clone(&self) -> Result<Box<dyn Reflect>, ReflectCloneError>

Source§

fn reflect_hash(&self) -> Option<u64>

Source§

fn reflect_partial_eq( &self, value: &(dyn PartialReflect + 'static), ) -> Option<bool>

Source§

fn reflect_partial_cmp( &self, value: &(dyn PartialReflect + 'static), ) -> Option<Ordering>

Source§

fn apply(&mut self, value: &(dyn PartialReflect + 'static))

Source§

fn try_apply( &mut self, value: &(dyn PartialReflect + 'static), ) -> Result<(), ApplyError>

Source§

impl<T> PartialReflect for Option<T>
where Option<T>: Any + Send + Sync, T: TypePath + FromReflect + MaybeTyped + RegisterForReflection,

Source§

fn get_represented_type_info(&self) -> Option<&'static TypeInfo>

Source§

fn try_apply( &mut self, __value_param: &(dyn PartialReflect + 'static), ) -> Result<(), ApplyError>

Source§

fn reflect_kind(&self) -> ReflectKind

Source§

fn reflect_ref(&self) -> ReflectRef<'_>

Source§

fn reflect_mut(&mut self) -> ReflectMut<'_>

Source§

fn reflect_owned(self: Box<Option<T>>) -> ReflectOwned

Source§

fn try_into_reflect( self: Box<Option<T>>, ) -> Result<Box<dyn Reflect>, Box<dyn PartialReflect>>

Source§

fn try_as_reflect(&self) -> Option<&(dyn Reflect + 'static)>

Source§

fn try_as_reflect_mut(&mut self) -> Option<&mut (dyn Reflect + 'static)>

Source§

fn into_partial_reflect(self: Box<Option<T>>) -> Box<dyn PartialReflect>

Source§

fn as_partial_reflect(&self) -> &(dyn PartialReflect + 'static)

Source§

fn as_partial_reflect_mut(&mut self) -> &mut (dyn PartialReflect + 'static)

Source§

fn reflect_hash(&self) -> Option<u64>

Source§

fn reflect_partial_eq( &self, value: &(dyn PartialReflect + 'static), ) -> Option<bool>

Source§

fn reflect_partial_cmp( &self, value: &(dyn PartialReflect + 'static), ) -> Option<Ordering>

Source§

fn reflect_clone(&self) -> Result<Box<dyn Reflect>, ReflectCloneError>

Source§

impl<T> PartialReflect for Range<T>
where T: Clone + Send + Sync + TypePath, Range<T>: Any + Send + Sync,

Source§

fn get_represented_type_info(&self) -> Option<&'static TypeInfo>

Source§

fn to_dynamic(&self) -> Box<dyn PartialReflect>

Source§

fn try_apply( &mut self, value: &(dyn PartialReflect + 'static), ) -> Result<(), ApplyError>

Source§

fn reflect_kind(&self) -> ReflectKind

Source§

fn reflect_ref(&self) -> ReflectRef<'_>

Source§

fn reflect_mut(&mut self) -> ReflectMut<'_>

Source§

fn reflect_owned(self: Box<Range<T>>) -> ReflectOwned

Source§

fn try_into_reflect( self: Box<Range<T>>, ) -> Result<Box<dyn Reflect>, Box<dyn PartialReflect>>

Source§

fn try_as_reflect(&self) -> Option<&(dyn Reflect + 'static)>

Source§

fn try_as_reflect_mut(&mut self) -> Option<&mut (dyn Reflect + 'static)>

Source§

fn into_partial_reflect(self: Box<Range<T>>) -> Box<dyn PartialReflect>

Source§

fn as_partial_reflect(&self) -> &(dyn PartialReflect + 'static)

Source§

fn as_partial_reflect_mut(&mut self) -> &mut (dyn PartialReflect + 'static)

Source§

fn reflect_clone(&self) -> Result<Box<dyn Reflect>, ReflectCloneError>

Source§

impl<T> PartialReflect for RangeFrom<T>
where T: Clone + Send + Sync + TypePath, RangeFrom<T>: Any + Send + Sync,

Source§

fn get_represented_type_info(&self) -> Option<&'static TypeInfo>

Source§

fn to_dynamic(&self) -> Box<dyn PartialReflect>

Source§

fn try_apply( &mut self, value: &(dyn PartialReflect + 'static), ) -> Result<(), ApplyError>

Source§

fn reflect_kind(&self) -> ReflectKind

Source§

fn reflect_ref(&self) -> ReflectRef<'_>

Source§

fn reflect_mut(&mut self) -> ReflectMut<'_>

Source§

fn reflect_owned(self: Box<RangeFrom<T>>) -> ReflectOwned

Source§

fn try_into_reflect( self: Box<RangeFrom<T>>, ) -> Result<Box<dyn Reflect>, Box<dyn PartialReflect>>

Source§

fn try_as_reflect(&self) -> Option<&(dyn Reflect + 'static)>

Source§

fn try_as_reflect_mut(&mut self) -> Option<&mut (dyn Reflect + 'static)>

Source§

fn into_partial_reflect(self: Box<RangeFrom<T>>) -> Box<dyn PartialReflect>

Source§

fn as_partial_reflect(&self) -> &(dyn PartialReflect + 'static)

Source§

fn as_partial_reflect_mut(&mut self) -> &mut (dyn PartialReflect + 'static)

Source§

fn reflect_clone(&self) -> Result<Box<dyn Reflect>, ReflectCloneError>

Source§

impl<T> PartialReflect for RangeInclusive<T>
where T: Clone + Send + Sync + TypePath, RangeInclusive<T>: Any + Send + Sync,

Source§

impl<T> PartialReflect for RangeTo<T>
where T: Clone + Send + Sync + TypePath, RangeTo<T>: Any + Send + Sync,

Source§

fn get_represented_type_info(&self) -> Option<&'static TypeInfo>

Source§

fn to_dynamic(&self) -> Box<dyn PartialReflect>

Source§

fn try_apply( &mut self, value: &(dyn PartialReflect + 'static), ) -> Result<(), ApplyError>

Source§

fn reflect_kind(&self) -> ReflectKind

Source§

fn reflect_ref(&self) -> ReflectRef<'_>

Source§

fn reflect_mut(&mut self) -> ReflectMut<'_>

Source§

fn reflect_owned(self: Box<RangeTo<T>>) -> ReflectOwned

Source§

fn try_into_reflect( self: Box<RangeTo<T>>, ) -> Result<Box<dyn Reflect>, Box<dyn PartialReflect>>

Source§

fn try_as_reflect(&self) -> Option<&(dyn Reflect + 'static)>

Source§

fn try_as_reflect_mut(&mut self) -> Option<&mut (dyn Reflect + 'static)>

Source§

fn into_partial_reflect(self: Box<RangeTo<T>>) -> Box<dyn PartialReflect>

Source§

fn as_partial_reflect(&self) -> &(dyn PartialReflect + 'static)

Source§

fn as_partial_reflect_mut(&mut self) -> &mut (dyn PartialReflect + 'static)

Source§

fn reflect_clone(&self) -> Result<Box<dyn Reflect>, ReflectCloneError>

Source§

impl<T> PartialReflect for RangeToInclusive<T>
where T: Clone + Send + Sync + TypePath, RangeToInclusive<T>: Any + Send + Sync,

Source§

impl<T> PartialReflect for Saturating<T>
where T: Clone + Send + Sync + TypePath, Saturating<T>: Any + Send + Sync,

Source§

impl<T> PartialReflect for SmallVec<T>
where T: Array + TypePath + Send + Sync, <T as Array>::Item: FromReflect + MaybeTyped + TypePath,

Source§

fn get_represented_type_info(&self) -> Option<&'static TypeInfo>

Source§

fn into_partial_reflect(self: Box<SmallVec<T>>) -> Box<dyn PartialReflect>

Source§

fn as_partial_reflect(&self) -> &(dyn PartialReflect + 'static)

Source§

fn as_partial_reflect_mut(&mut self) -> &mut (dyn PartialReflect + 'static)

Source§

fn try_into_reflect( self: Box<SmallVec<T>>, ) -> Result<Box<dyn Reflect>, Box<dyn PartialReflect>>

Source§

fn try_as_reflect(&self) -> Option<&(dyn Reflect + 'static)>

Source§

fn try_as_reflect_mut(&mut self) -> Option<&mut (dyn Reflect + 'static)>

Source§

fn apply(&mut self, value: &(dyn PartialReflect + 'static))

Source§

fn try_apply( &mut self, value: &(dyn PartialReflect + 'static), ) -> Result<(), ApplyError>

Source§

fn reflect_kind(&self) -> ReflectKind

Source§

fn reflect_ref(&self) -> ReflectRef<'_>

Source§

fn reflect_mut(&mut self) -> ReflectMut<'_>

Source§

fn reflect_owned(self: Box<SmallVec<T>>) -> ReflectOwned

Source§

fn reflect_clone(&self) -> Result<Box<dyn Reflect>, ReflectCloneError>

Source§

fn reflect_partial_eq( &self, value: &(dyn PartialReflect + 'static), ) -> Option<bool>

Source§

fn reflect_partial_cmp( &self, value: &(dyn PartialReflect + 'static), ) -> Option<Ordering>

Source§

impl<T> PartialReflect for VecDeque<T>
where T: FromReflect + MaybeTyped + TypePath + GetTypeRegistration,

Source§

fn get_represented_type_info(&self) -> Option<&'static TypeInfo>

Source§

fn into_partial_reflect(self: Box<VecDeque<T>>) -> Box<dyn PartialReflect>

Source§

fn as_partial_reflect(&self) -> &(dyn PartialReflect + 'static)

Source§

fn as_partial_reflect_mut(&mut self) -> &mut (dyn PartialReflect + 'static)

Source§

fn try_into_reflect( self: Box<VecDeque<T>>, ) -> Result<Box<dyn Reflect>, Box<dyn PartialReflect>>

Source§

fn try_as_reflect(&self) -> Option<&(dyn Reflect + 'static)>

Source§

fn try_as_reflect_mut(&mut self) -> Option<&mut (dyn Reflect + 'static)>

Source§

fn reflect_kind(&self) -> ReflectKind

Source§

fn reflect_ref(&self) -> ReflectRef<'_>

Source§

fn reflect_mut(&mut self) -> ReflectMut<'_>

Source§

fn reflect_owned(self: Box<VecDeque<T>>) -> ReflectOwned

Source§

fn reflect_clone(&self) -> Result<Box<dyn Reflect>, ReflectCloneError>

Source§

fn reflect_hash(&self) -> Option<u64>

Source§

fn reflect_partial_eq( &self, value: &(dyn PartialReflect + 'static), ) -> Option<bool>

Source§

fn reflect_partial_cmp( &self, value: &(dyn PartialReflect + 'static), ) -> Option<Ordering>

Source§

fn apply(&mut self, value: &(dyn PartialReflect + 'static))

Source§

fn try_apply( &mut self, value: &(dyn PartialReflect + 'static), ) -> Result<(), ApplyError>

Source§

impl<T> PartialReflect for Wrapping<T>
where T: Clone + Send + Sync + TypePath, Wrapping<T>: Any + Send + Sync,

Source§

fn get_represented_type_info(&self) -> Option<&'static TypeInfo>

Source§

fn to_dynamic(&self) -> Box<dyn PartialReflect>

Source§

fn try_apply( &mut self, value: &(dyn PartialReflect + 'static), ) -> Result<(), ApplyError>

Source§

fn reflect_kind(&self) -> ReflectKind

Source§

fn reflect_ref(&self) -> ReflectRef<'_>

Source§

fn reflect_mut(&mut self) -> ReflectMut<'_>

Source§

fn reflect_owned(self: Box<Wrapping<T>>) -> ReflectOwned

Source§

fn try_into_reflect( self: Box<Wrapping<T>>, ) -> Result<Box<dyn Reflect>, Box<dyn PartialReflect>>

Source§

fn try_as_reflect(&self) -> Option<&(dyn Reflect + 'static)>

Source§

fn try_as_reflect_mut(&mut self) -> Option<&mut (dyn Reflect + 'static)>

Source§

fn into_partial_reflect(self: Box<Wrapping<T>>) -> Box<dyn PartialReflect>

Source§

fn as_partial_reflect(&self) -> &(dyn PartialReflect + 'static)

Source§

fn as_partial_reflect_mut(&mut self) -> &mut (dyn PartialReflect + 'static)

Source§

fn reflect_clone(&self) -> Result<Box<dyn Reflect>, ReflectCloneError>

Source§

impl<V, S> PartialReflect for HashSet<V, S>

Source§

fn get_represented_type_info(&self) -> Option<&'static TypeInfo>

Source§

fn into_partial_reflect(self: Box<HashSet<V, S>>) -> Box<dyn PartialReflect>

Source§

fn as_partial_reflect(&self) -> &(dyn PartialReflect + 'static)

Source§

fn as_partial_reflect_mut(&mut self) -> &mut (dyn PartialReflect + 'static)

Source§

fn try_into_reflect( self: Box<HashSet<V, S>>, ) -> Result<Box<dyn Reflect>, Box<dyn PartialReflect>>

Source§

fn try_as_reflect(&self) -> Option<&(dyn Reflect + 'static)>

Source§

fn try_as_reflect_mut(&mut self) -> Option<&mut (dyn Reflect + 'static)>

Source§

fn apply(&mut self, value: &(dyn PartialReflect + 'static))

Source§

fn try_apply( &mut self, value: &(dyn PartialReflect + 'static), ) -> Result<(), ApplyError>

Source§

fn reflect_kind(&self) -> ReflectKind

Source§

fn reflect_ref(&self) -> ReflectRef<'_>

Source§

fn reflect_mut(&mut self) -> ReflectMut<'_>

Source§

fn reflect_owned(self: Box<HashSet<V, S>>) -> ReflectOwned

Source§

fn reflect_clone(&self) -> Result<Box<dyn Reflect>, ReflectCloneError>

Source§

fn reflect_partial_eq( &self, value: &(dyn PartialReflect + 'static), ) -> Option<bool>

Implementors§

Source§

impl PartialReflect for Aabb

Source§

impl PartialReflect for Aabb2d

Source§

impl PartialReflect for Aabb3d

Source§

impl PartialReflect for AabbCast2d

Source§

impl PartialReflect for AabbCast3d

Source§

impl PartialReflect for AabbGizmoConfigGroup

Source§

impl PartialReflect for AccessibilityRequested

Source§

impl PartialReflect for AccessibilitySystems

Source§

impl PartialReflect for AccessibleLabel

Source§

impl PartialReflect for AccumulatedMouseMotion

Source§

impl PartialReflect for AccumulatedMouseScroll

Source§

impl PartialReflect for AcquireFocus

Source§

impl PartialReflect for Activate

Source§

impl PartialReflect for ActivateOnPress

Source§

impl PartialReflect for ActiveAnimation

Source§

impl PartialReflect for ActiveDescendant

Source§

impl PartialReflect for Add

Source§

impl PartialReflect for Affine2

Source§

impl PartialReflect for Affine3

Source§

impl PartialReflect for Affine3A

Source§

impl PartialReflect for AlignContent

Source§

impl PartialReflect for AlignItems

Source§

impl PartialReflect for AlignSelf

Source§

impl PartialReflect for AlphaMode

Source§

impl PartialReflect for AlphaMode2d

Source§

impl PartialReflect for AmbientLight

Source§

impl PartialReflect for Anchor

Source§

impl PartialReflect for AngularColorStop

Source§

impl PartialReflect for AnimatedBy

Source§

impl PartialReflect for AnimationClip

Source§

impl PartialReflect for AnimationGraph

Source§

impl PartialReflect for AnimationGraphHandle

Source§

impl PartialReflect for AnimationGraphNode

Source§

impl PartialReflect for AnimationNodeType

Source§

impl PartialReflect for AnimationPlayer

Source§

impl PartialReflect for AnimationTargetId

Source§

impl PartialReflect for AnimationTransition

Source§

impl PartialReflect for AnimationTransitions

Source§

impl PartialReflect for Annulus

Source§

impl PartialReflect for AnnulusMeshBuilder

Source§

impl PartialReflect for AppExit

Source§

impl PartialReflect for AppLifecycle

Source§

impl PartialReflect for Arc2d

Source§

impl PartialReflect for AspectRatio

Source§

impl PartialReflect for AssetIndex

Source§

impl PartialReflect for AtmosphereMode

Source§

impl PartialReflect for AtmosphereSettings

Source§

impl PartialReflect for AutoDirectionalNavigation

Source§

impl PartialReflect for AutoExposure

Source§

impl PartialReflect for AutoExposureCompensationCurve

Source§

impl PartialReflect for AutoFocus

Source§

impl PartialReflect for AutoNavigationConfig

Source§

impl PartialReflect for AxisSettings

Source§

impl PartialReflect for BVec2

Source§

impl PartialReflect for BVec3

Source§

impl PartialReflect for BVec4

Source§

impl PartialReflect for BVec3A

Source§

impl PartialReflect for BVec4A

Source§

impl PartialReflect for Backfaces

Source§

impl PartialReflect for BackgroundColor

Source§

impl PartialReflect for BackgroundGradient

Source§

impl PartialReflect for BlendState

Source§

impl PartialReflect for Bloom

Source§

impl PartialReflect for BloomCompositeMode

Source§

impl PartialReflect for BloomPrefilter

Source§

impl PartialReflect for BorderColor

Source§

impl PartialReflect for BorderGradient

Source§

impl PartialReflect for BorderRadius

Source§

impl PartialReflect for BorderRect

Source§

impl PartialReflect for BoundingCircle

Source§

impl PartialReflect for BoundingCircleCast

Source§

impl PartialReflect for BoundingSphere

Source§

impl PartialReflect for BoundingSphereCast

Source§

impl PartialReflect for BoxShadow

Source§

impl PartialReflect for BoxShadowSamples

Source§

impl PartialReflect for BoxSizing

Source§

impl PartialReflect for bevy::prelude::Button

Source§

impl PartialReflect for bevy::ui_widgets::Button

Source§

impl PartialReflect for ButtonAxisSettings

Source§

impl PartialReflect for ButtonSettings

Source§

impl PartialReflect for ButtonState

Source§

impl PartialReflect for ButtonVariant

Source§

impl PartialReflect for CalculatedClip

Source§

impl PartialReflect for Camera

Source§

impl PartialReflect for Camera2d

Source§

impl PartialReflect for Camera3d

Source§

impl PartialReflect for Camera3dDepthLoadOp

Source§

impl PartialReflect for Camera3dDepthTextureUsage

Source§

impl PartialReflect for CameraMainTextureUsages

Source§

impl PartialReflect for CameraOutputMode

Source§

impl PartialReflect for CameraRenderGraph

Source§

impl PartialReflect for Cancel

Source§

impl PartialReflect for Capsule2d

Source§

impl PartialReflect for Capsule2dMeshBuilder

Source§

impl PartialReflect for Capsule3d

Source§

impl PartialReflect for Capsule3dMeshBuilder

Source§

impl PartialReflect for CapsuleUvProfile

Source§

impl PartialReflect for Cascade

Source§

impl PartialReflect for CascadeShadowConfig

Source§

impl PartialReflect for Cascades

Source§

impl PartialReflect for CascadesFrusta

Source§

impl PartialReflect for CascadesVisibleEntities

Source§

impl PartialReflect for Checkable

Source§

impl PartialReflect for Checkbox

Source§

impl PartialReflect for Checked

Source§

impl PartialReflect for ChildOf

Source§

impl PartialReflect for Children

Source§

impl PartialReflect for ChromaticAberration

Source§

impl PartialReflect for Circle

Source§

impl PartialReflect for CircleMeshBuilder

Source§

impl PartialReflect for CircularMeshUvMode

Source§

impl PartialReflect for CircularSector

Source§

impl PartialReflect for CircularSectorMeshBuilder

Source§

impl PartialReflect for CircularSegment

Source§

impl PartialReflect for CircularSegmentMeshBuilder

Source§

impl PartialReflect for ClearColor

Source§

impl PartialReflect for ClearColorConfig

Source§

impl PartialReflect for Click

Source§

impl PartialReflect for ClusterConfig

Source§

impl PartialReflect for ClusterFarZMode

Source§

impl PartialReflect for ClusterZConfig

Source§

impl PartialReflect for ClusteredDecal

Source§

impl PartialReflect for Color

Source§

impl PartialReflect for ColorChannel

Source§

impl PartialReflect for ColorGrading

Source§

impl PartialReflect for ColorGradingGlobal

Source§

impl PartialReflect for ColorGradingSection

Source§

impl PartialReflect for ColorMaterial

Source§

impl PartialReflect for ColorPlaneValue

Source§

impl PartialReflect for ColorSlider

Source§

impl PartialReflect for ColorStop

Source§

impl PartialReflect for ColorSwatchFg

Source§

impl PartialReflect for ColorSwatchValue

Source§

impl PartialReflect for CompassOctant

Source§

impl PartialReflect for CompassQuadrant

Source§

impl PartialReflect for ComponentId

Source§

impl PartialReflect for ComponentTicks

Source§

impl PartialReflect for CompositeAlphaMode

Source§

impl PartialReflect for CompositingSpace

Source§

impl PartialReflect for ComputedCameraValues

Source§

impl PartialReflect for ComputedNode

Source§

impl PartialReflect for ComputedStackIndex

Source§

impl PartialReflect for ComputedTextBlock

Source§

impl PartialReflect for ComputedUiRenderTargetInfo

Source§

impl PartialReflect for ComputedUiTargetCamera

Source§

impl PartialReflect for Cone

Source§

impl PartialReflect for ConeAnchor

Source§

impl PartialReflect for ConeMeshBuilder

Source§

impl PartialReflect for ConicGradient

Source§

impl PartialReflect for ConicalFrustum

Source§

impl PartialReflect for ConicalFrustumMeshBuilder

Source§

impl PartialReflect for ContactShadows

Source§

impl PartialReflect for ContentSize

Source§

impl PartialReflect for ContrastAdaptiveSharpening

Source§

impl PartialReflect for ControlOrientation

Source§

impl PartialReflect for ConvexPolygon

Source§

impl PartialReflect for ConvexPolygonMeshBuilder

Source§

impl PartialReflect for CubemapFrusta

Source§

impl PartialReflect for CubemapLayout

Source§

impl PartialReflect for CubemapVisibleEntities

Source§

impl PartialReflect for CubicRotationCurve

Source§

impl PartialReflect for Cuboid

Source§

impl PartialReflect for CuboidMeshBuilder

Source§

impl PartialReflect for CursorEntered

Source§

impl PartialReflect for CursorGrabMode

Source§

impl PartialReflect for CursorIcon

Source§

impl PartialReflect for CursorLeft

Source§

impl PartialReflect for CursorMoved

Source§

impl PartialReflect for CursorOptions

Source§

impl PartialReflect for CustomCursor

Source§

impl PartialReflect for CustomCursorImage

Source§

impl PartialReflect for CustomCursorUrl

Source§

impl PartialReflect for CustomProjection

Source§

impl PartialReflect for Cylinder

Source§

impl PartialReflect for CylinderAnchor

Source§

impl PartialReflect for CylinderMeshBuilder

Source§

impl PartialReflect for DAffine2

Source§

impl PartialReflect for DAffine3

Source§

impl PartialReflect for DMat2

Source§

impl PartialReflect for DMat3

Source§

impl PartialReflect for DMat4

Source§

impl PartialReflect for DQuat

Source§

impl PartialReflect for DVec2

Source§

impl PartialReflect for DVec3

Source§

impl PartialReflect for DVec4

Source§

impl PartialReflect for DebandDither

Source§

impl PartialReflect for DefaultCursor

Source§

impl PartialReflect for DefaultGizmoConfigGroup

Source§

impl PartialReflect for DefaultOpaqueRendererMethod

Source§

impl PartialReflect for DefaultQueryFilters

Source§

impl PartialReflect for DefaultSpatialScale

Source§

impl PartialReflect for DeferredPrepass

Source§

impl PartialReflect for DeferredPrepassDoubleBuffer

Source§

impl PartialReflect for DelayedCommandQueue

Source§

impl PartialReflect for DenoiseCas

Source§

impl PartialReflect for DepthOfField

Source§

impl PartialReflect for DepthOfFieldMode

Source§

impl PartialReflect for DepthPrepass

Source§

impl PartialReflect for DepthPrepassDoubleBuffer

Source§

impl PartialReflect for Despawn

Source§

impl PartialReflect for Dir2

Source§

impl PartialReflect for Dir3

Source§

impl PartialReflect for Dir4

Source§

impl PartialReflect for Dir3A

Source§

impl PartialReflect for DirectionalLight

Source§

impl PartialReflect for DirectionalLightShadowMap

Source§

impl PartialReflect for DirectionalLightTexture

Source§

impl PartialReflect for DirectionalNavigationMap

Source§

impl PartialReflect for DirectlyHovered

Source§

impl PartialReflect for Disabled

Source§

impl PartialReflect for Discard

Source§

impl PartialReflect for Display

Source§

impl PartialReflect for DistanceFog

Source§

impl PartialReflect for DoubleTapGesture

Source§

impl PartialReflect for Drag

Source§

impl PartialReflect for DragDrop

Source§

impl PartialReflect for DragEnd

Source§

impl PartialReflect for DragEnter

Source§

impl PartialReflect for DragEntry

Source§

impl PartialReflect for DragLeave

Source§

impl PartialReflect for DragOver

Source§

impl PartialReflect for DragStart

Source§

impl PartialReflect for DynamicArray

Source§

impl PartialReflect for DynamicEnum

Source§

impl PartialReflect for DynamicFunction<'static>

Source§

impl PartialReflect for DynamicList

Source§

impl PartialReflect for DynamicMap

Source§

impl PartialReflect for DynamicSet

Source§

impl PartialReflect for DynamicSkinnedMeshBounds

Source§

impl PartialReflect for DynamicStruct

Source§

impl PartialReflect for DynamicTuple

Source§

impl PartialReflect for DynamicTupleStruct

Source§

impl PartialReflect for DynamicWorldRoot

Source§

impl PartialReflect for EaseFunction

Source§

impl PartialReflect for Ellipse

Source§

impl PartialReflect for EllipseMeshBuilder

Source§

impl PartialReflect for EnabledButtons

Source§

impl PartialReflect for Enter

Source§

impl PartialReflect for Entity

Source§

impl PartialReflect for EntityCursor

Source§

impl PartialReflect for EntityGeneration

Source§

impl PartialReflect for EntityHash

Source§

impl PartialReflect for EntityHashSet

Source§

impl PartialReflect for EntityIndex

Source§

impl PartialReflect for EntityIndexSet

Source§

impl PartialReflect for EnvironmentMapLight

Source§

impl PartialReflect for ErasedGizmoConfigGroup

Source§

impl PartialReflect for EulerRot

Source§

impl PartialReflect for Exposure

Source§

impl PartialReflect for FeathersButton

Source§

impl PartialReflect for FeathersCheckbox

Source§

impl PartialReflect for FeathersColorPlane

Source§

impl PartialReflect for FeathersColorSlider

Source§

impl PartialReflect for FeathersColorSwatch

Source§

impl PartialReflect for FeathersDisclosureToggle

Source§

impl PartialReflect for FeathersListRow

Source§

impl PartialReflect for FeathersListView

Source§

impl PartialReflect for FeathersMenu

Source§

impl PartialReflect for FeathersMenuButton

Source§

impl PartialReflect for FeathersMenuDivider

Source§

impl PartialReflect for FeathersMenuItem

Source§

impl PartialReflect for FeathersMenuPopup

Source§

impl PartialReflect for FeathersNumberInput

Source§

impl PartialReflect for FeathersRadio

Source§

impl PartialReflect for FeathersScrollbar

Source§

impl PartialReflect for FeathersSlider

Source§

impl PartialReflect for FeathersTextInput

Source§

impl PartialReflect for FeathersTextInputContainer

Source§

impl PartialReflect for FeathersToggleSwitch

Source§

impl PartialReflect for FeathersToolButton

Source§

impl PartialReflect for FileDragAndDrop

Source§

impl PartialReflect for Fixed

Source§

impl PartialReflect for FlexDirection

Source§

impl PartialReflect for FlexWrap

Source§

impl PartialReflect for FloatOrd

Source§

impl PartialReflect for FocusCause

Source§

impl PartialReflect for FocusGained

Source§

impl PartialReflect for FocusIndicator

Source§

impl PartialReflect for FocusLost

Source§

impl PartialReflect for FocusPolicy

Source§

impl PartialReflect for FocusWithinIndicator

Source§

impl PartialReflect for FocusableArea

Source§

impl PartialReflect for FogFalloff

Source§

impl PartialReflect for FogVolume

Source§

impl PartialReflect for FontFeatureTag

Source§

impl PartialReflect for FontFeatures

Source§

impl PartialReflect for FontHinting

Source§

impl PartialReflect for FontSize

Source§

impl PartialReflect for FontSmoothing

Source§

impl PartialReflect for FontSource

Source§

impl PartialReflect for FontStyle

Source§

impl PartialReflect for FontVariationTag

Source§

impl PartialReflect for FontVariations

Source§

impl PartialReflect for FontWeight

Source§

impl PartialReflect for FontWidth

Source§

impl PartialReflect for ForceTouch

Source§

impl PartialReflect for ForwardDecal

Source§

impl PartialReflect for FpsOverlayConfig

Source§

impl PartialReflect for FrameTimeGraphConfig

Source§

impl PartialReflect for Frustum

Source§

impl PartialReflect for FrustumGizmoConfigGroup

Source§

impl PartialReflect for Fxaa

Source§

impl PartialReflect for Gamepad

Source§

impl PartialReflect for GamepadAxis

Source§

impl PartialReflect for GamepadAxisChangedEvent

Source§

impl PartialReflect for GamepadButton

Source§

impl PartialReflect for GamepadButtonChangedEvent

Source§

impl PartialReflect for GamepadButtonStateChangedEvent

Source§

impl PartialReflect for GamepadConnection

Source§

impl PartialReflect for GamepadConnectionEvent

Source§

impl PartialReflect for GamepadEvent

Source§

impl PartialReflect for GamepadInput

Source§

impl PartialReflect for GamepadRumbleIntensity

Source§

impl PartialReflect for GamepadRumbleRequest

Source§

impl PartialReflect for GamepadSettings

Source§

impl PartialReflect for GeneratedEnvironmentMapLight

Source§

impl PartialReflect for GhostNode

Source§

impl PartialReflect for Gizmo

Source§

impl PartialReflect for GizmoConfig

Source§

impl PartialReflect for GizmoConfigStore

Source§

impl PartialReflect for GizmoLineConfig

Source§

impl PartialReflect for GizmoLineJoint

Source§

impl PartialReflect for GizmoLineStyle

Source§

impl PartialReflect for GlobalAmbientLight

Source§

impl PartialReflect for GlobalRenderDebugOverlay

Source§

impl PartialReflect for GlobalTransform

Source§

impl PartialReflect for GlobalUiDebugOptions

Source§

impl PartialReflect for GlobalVolume

Source§

impl PartialReflect for GlobalZIndex

Source§

impl PartialReflect for GlobalsUniform

Source§

impl PartialReflect for GltfExtras

Source§

impl PartialReflect for GltfMaterialExtras

Source§

impl PartialReflect for GltfMaterialName

Source§

impl PartialReflect for GltfMeshExtras

Source§

impl PartialReflect for GltfMeshName

Source§

impl PartialReflect for GltfSceneExtras

Source§

impl PartialReflect for GltfSceneName

Source§

impl PartialReflect for GlyphAtlasInfo

Source§

impl PartialReflect for GlyphAtlasLocation

Source§

impl PartialReflect for GpuAtmosphereSettings

Source§

impl PartialReflect for Gradient

Source§

impl PartialReflect for GridAutoFlow

Source§

impl PartialReflect for GridPlacement

Source§

impl PartialReflect for GridTrack

Source§

impl PartialReflect for GridTrackRepetition

Source§

impl PartialReflect for HalfSpace

Source§

impl PartialReflect for HashedStr

Source§

impl PartialReflect for Hdr

Source§

impl PartialReflect for HitData

Source§

impl PartialReflect for Hovered

Source§

impl PartialReflect for Hsla

Source§

impl PartialReflect for Hsva

Source§

impl PartialReflect for Hwba

Source§

impl PartialReflect for I8Vec2

Source§

impl PartialReflect for I8Vec3

Source§

impl PartialReflect for I8Vec4

Source§

impl PartialReflect for I16Vec2

Source§

impl PartialReflect for I16Vec3

Source§

impl PartialReflect for I16Vec4

Source§

impl PartialReflect for I64Vec2

Source§

impl PartialReflect for I64Vec3

Source§

impl PartialReflect for I64Vec4

Source§

impl PartialReflect for IRect

Source§

impl PartialReflect for IVec2

Source§

impl PartialReflect for IVec3

Source§

impl PartialReflect for IVec4

Source§

impl PartialReflect for IgnoreScroll

Source§

impl PartialReflect for Image

Source§

impl PartialReflect for ImageAddressMode

Source§

impl PartialReflect for ImageCompareFunction

Source§

impl PartialReflect for ImageFilterMode

Source§

impl PartialReflect for ImageNode

Source§

impl PartialReflect for ImageNodeSize

Source§

impl PartialReflect for ImageRenderTarget

Source§

impl PartialReflect for ImageSampler

Source§

impl PartialReflect for ImageSamplerBorderColor

Source§

impl PartialReflect for ImageSamplerDescriptor

Source§

impl PartialReflect for Ime

Source§

impl PartialReflect for Indices

Source§

impl PartialReflect for InfiniteGrid

Source§

impl PartialReflect for InfiniteGridSettings

Source§

impl PartialReflect for InfinitePlane3d

Source§

impl PartialReflect for InheritableFont

Source§

impl PartialReflect for InheritableThemeTextColor

Source§

impl PartialReflect for InheritedVisibility

Source§

impl PartialReflect for InlineDirection

Source§

impl PartialReflect for InputFocus

Source§

impl PartialReflect for InputFocusVisible

Source§

impl PartialReflect for Insert

Source§

impl PartialReflect for InstanceId

Source§

impl PartialReflect for Instant

Source§

impl PartialReflect for Interaction

Source§

impl PartialReflect for InteractionDisabled

Source§

impl PartialReflect for InternalWindowState

Source§

impl PartialReflect for InterpolationColorSpace

Source§

impl PartialReflect for Interval

Source§

impl PartialReflect for IrradianceVolume

Source§

impl PartialReflect for IsDefaultUiCamera

Source§

impl PartialReflect for IsResource

Source§

impl PartialReflect for Isometry2d

Source§

impl PartialReflect for Isometry3d

Source§

impl PartialReflect for JointAabb

Source§

impl PartialReflect for JointIndex

Source§

impl PartialReflect for JumpAt

Source§

impl PartialReflect for Justify

Source§

impl PartialReflect for JustifyContent

Source§

impl PartialReflect for JustifyItems

Source§

impl PartialReflect for JustifySelf

Source§

impl PartialReflect for Key

Source§

impl PartialReflect for KeyCode

Source§

impl PartialReflect for KeyboardFocusLost

Source§

impl PartialReflect for KeyboardInput

Source§

impl PartialReflect for Laba

Source§

impl PartialReflect for Label

Source§

impl PartialReflect for LayoutConfig

Source§

impl PartialReflect for Lcha

Source§

impl PartialReflect for Leave

Source§

impl PartialReflect for LensDistortion

Source§

impl PartialReflect for LetterSpacing

Source§

impl PartialReflect for LightGizmoColor

Source§

impl PartialReflect for LightGizmoConfigGroup

Source§

impl PartialReflect for LightProbe

Source§

impl PartialReflect for Lightmap

Source§

impl PartialReflect for Line2d

Source§

impl PartialReflect for Line3d

Source§

impl PartialReflect for LineBreak

Source§

impl PartialReflect for LineGizmoEntities

Source§

impl PartialReflect for LineHeight

Source§

impl PartialReflect for LinearGradient

Source§

impl PartialReflect for LinearRgba

Source§

impl PartialReflect for ListItem

Source§

impl PartialReflect for bevy::picking::pointer::Location

Source§

impl PartialReflect for MainEntity

Source§

impl PartialReflect for MainPassResolutionOverride

Source§

impl PartialReflect for ManageAccessibilityUpdates

Source§

impl PartialReflect for ManualTextureViewHandle

Source§

impl PartialReflect for Mat2

Source§

impl PartialReflect for Mat3

Source§

impl PartialReflect for Mat4

Source§

impl PartialReflect for Mat3A

Source§

impl PartialReflect for MaterialBindGroupIndex

Source§

impl PartialReflect for MaterialBindGroupSlot

Source§

impl PartialReflect for MaterialBindingId

Source§

impl PartialReflect for MaxTrackSizingFunction

Source§

impl PartialReflect for MenuAction

Source§

impl PartialReflect for MenuButton

Source§

impl PartialReflect for MenuEvent

Source§

impl PartialReflect for MenuFocusState

Source§

impl PartialReflect for MenuItem

Source§

impl PartialReflect for MenuLayout

Source§

impl PartialReflect for MenuPopup

Source§

impl PartialReflect for Mesh

Source§

impl PartialReflect for Mesh2d

Source§

impl PartialReflect for Mesh2dWireframe

Source§

impl PartialReflect for Mesh3d

Source§

impl PartialReflect for Mesh3dWireframe

Source§

impl PartialReflect for MeshMorphWeights

Source§

impl PartialReflect for MeshPickingCamera

Source§

impl PartialReflect for MeshPickingSettings

Source§

impl PartialReflect for MeshTag

Source§

impl PartialReflect for MeshletMesh3d

Source§

impl PartialReflect for MinTrackSizingFunction

Source§

impl PartialReflect for MipBias

Source§

impl PartialReflect for Monitor

Source§

impl PartialReflect for MonitorSelection

Source§

impl PartialReflect for MorphAttributes

Source§

impl PartialReflect for MorphWeights

Source§

impl PartialReflect for MotionBlur

Source§

impl PartialReflect for MotionVectorPrepass

Source§

impl PartialReflect for MouseButton

Source§

impl PartialReflect for MouseButtonInput

Source§

impl PartialReflect for MouseMotion

Source§

impl PartialReflect for MouseScrollUnit

Source§

impl PartialReflect for MouseWheel

Source§

impl PartialReflect for Move

Source§

impl PartialReflect for Msaa

Source§

impl PartialReflect for MsaaWriteback

Source§

impl PartialReflect for Name

Source§

impl PartialReflect for NativeKey

Source§

impl PartialReflect for NativeKeyCode

Source§

impl PartialReflect for NavAction

Source§

impl PartialReflect for NavNeighbor

Source§

impl PartialReflect for NavNeighbors

Source§

impl PartialReflect for NoAutoAabb

Source§

impl PartialReflect for NoBackgroundMotionVectors

Source§

impl PartialReflect for NoFrustumCulling

Source§

impl PartialReflect for NoWireframe

Source§

impl PartialReflect for NoWireframe2d

Source§

impl PartialReflect for Node

Source§

impl PartialReflect for NodeImageMode

Source§

impl PartialReflect for NonNilUuid

Source§

impl PartialReflect for NormalPrepass

Source§

impl PartialReflect for NormalizedRenderTarget

Source§

impl PartialReflect for NormalizedWindowRef

Source§

impl PartialReflect for NotShadowCaster

Source§

impl PartialReflect for NotShadowReceiver

Source§

impl PartialReflect for NumberFormat

Source§

impl PartialReflect for NumberInputValue

Source§

impl PartialReflect for ObservedBy

Source§

impl PartialReflect for OcclusionCulling

Source§

impl PartialReflect for OffsetAccess

Source§

impl PartialReflect for Oklaba

Source§

impl PartialReflect for Oklcha

Source§

impl PartialReflect for OpaqueRendererMethod

Source§

impl PartialReflect for OrderIndependentTransparencySettings

Source§

impl PartialReflect for OrthographicProjection

Source§

impl PartialReflect for Out

Source§

impl PartialReflect for OuterColor

Source§

impl PartialReflect for Outline

Source§

impl PartialReflect for Over

Source§

impl PartialReflect for Overflow

Source§

impl PartialReflect for OverflowAxis

Source§

impl PartialReflect for OverflowClipMargin

Source§

impl PartialReflect for OverrideClip

Source§

impl PartialReflect for OverrideCursor

Source§

impl PartialReflect for PanGesture

Source§

impl PartialReflect for ParallaxCorrection

Source§

impl PartialReflect for ParallaxMappingMethod

Source§

impl PartialReflect for ParsedPath

Source§

impl PartialReflect for Pathtracer

Source§

impl PartialReflect for PerspectiveProjection

Source§

impl PartialReflect for Pickable

Source§

impl PartialReflect for PickingInteraction

Source§

impl PartialReflect for PickingSettings

Source§

impl PartialReflect for PinchGesture

Source§

impl PartialReflect for Plane2d

Source§

impl PartialReflect for Plane3d

Source§

impl PartialReflect for PlaneMeshBuilder

Source§

impl PartialReflect for PlaybackMode

Source§

impl PartialReflect for PlaybackSettings

Source§

impl PartialReflect for PointLight

Source§

impl PartialReflect for PointLightShadowMap

Source§

impl PartialReflect for PointLightTexture

Source§

impl PartialReflect for PointerAction

Source§

impl PartialReflect for PointerButton

Source§

impl PartialReflect for PointerHits

Source§

impl PartialReflect for PointerId

Source§

impl PartialReflect for PointerInput

Source§

impl PartialReflect for PointerInputSettings

Source§

impl PartialReflect for PointerInteraction

Source§

impl PartialReflect for PointerLocation

Source§

impl PartialReflect for PointerPress

Source§

impl PartialReflect for Polygon

Source§

impl PartialReflect for Polyline2d

Source§

impl PartialReflect for Polyline2dMeshBuilder

Source§

impl PartialReflect for Polyline3d

Source§

impl PartialReflect for Popover

Source§

impl PartialReflect for PopoverAlign

Source§

impl PartialReflect for PopoverPlacement

Source§

impl PartialReflect for PopoverSide

Source§

impl PartialReflect for PositionType

Source§

impl PartialReflect for PositionedGlyph

Source§

impl PartialReflect for PreeditCursor

Source§

impl PartialReflect for PresentMode

Source§

impl PartialReflect for Press

Source§

impl PartialReflect for PressDirection

Source§

impl PartialReflect for Pressed

Source§

impl PartialReflect for PrimaryMonitor

Source§

impl PartialReflect for PrimaryWindow

Source§

impl PartialReflect for Projection

Source§

impl PartialReflect for Quat

Source§

impl PartialReflect for RadialGradient

Source§

impl PartialReflect for RadialGradientShape

Source§

impl PartialReflect for RadioButton

Source§

impl PartialReflect for RadioGroup

Source§

impl PartialReflect for RawGamepadAxisChangedEvent

Source§

impl PartialReflect for RawGamepadButtonChangedEvent

Source§

impl PartialReflect for RawGamepadEvent

Source§

impl PartialReflect for Ray2d

Source§

impl PartialReflect for Ray3d

Source§

impl PartialReflect for RayCast2d

Source§

impl PartialReflect for RayCast3d

Source§

impl PartialReflect for RayCastBackfaces

Source§

impl PartialReflect for RayCastVisibility

Source§

impl PartialReflect for RayId

Source§

impl PartialReflect for RayMeshHit

Source§

impl PartialReflect for RaytracingMesh3d

Source§

impl PartialReflect for ReadbackComplete

Source§

impl PartialReflect for Real

Source§

impl PartialReflect for Rect

Source§

impl PartialReflect for RectLight

Source§

impl PartialReflect for Rectangle

Source§

impl PartialReflect for RectangleMeshBuilder

Source§

impl PartialReflect for RegularPolygon

Source§

impl PartialReflect for RegularPolygonMeshBuilder

Source§

impl PartialReflect for RelativeCursorPosition

Source§

impl PartialReflect for Release

Source§

impl PartialReflect for Remove

Source§

impl PartialReflect for RemovedComponentEntity

Source§

impl PartialReflect for RenderAssetUsages

Source§

impl PartialReflect for RenderDebugMode

Source§

impl PartialReflect for RenderDebugOverlay

Source§

impl PartialReflect for RenderDebugOverlayEvent

Source§

impl PartialReflect for RenderEntity

Source§

impl PartialReflect for RenderLayers

Source§

impl PartialReflect for RenderShadowMapVisibleEntities

Source§

impl PartialReflect for RenderTarget

Source§

impl PartialReflect for RenderTargetInfo

Source§

impl PartialReflect for RenderVisibleEntitiesClass

Source§

impl PartialReflect for RepeatAnimation

Source§

impl PartialReflect for RepeatedGridTrack

Source§

impl PartialReflect for RequestRedraw

Source§

impl PartialReflect for ResolvedBorderRadius

Source§

impl PartialReflect for Rhombus

Source§

impl PartialReflect for RhombusMeshBuilder

Source§

impl PartialReflect for RootNonCameraView

Source§

impl PartialReflect for Rot2

Source§

impl PartialReflect for RotationGesture

Source§

impl PartialReflect for RunGeometry

Source§

impl PartialReflect for ScalingMode

Source§

impl PartialReflect for SceneComponentInfo

Source§

impl PartialReflect for SchemaTypesMetadata

Source§

impl PartialReflect for ScreenEdge

Source§

impl PartialReflect for ScreenSpaceAmbientOcclusion

Source§

impl PartialReflect for ScreenSpaceAmbientOcclusionQualityLevel

Source§

impl PartialReflect for ScreenSpaceReflections

Source§

impl PartialReflect for ScreenSpaceTransmission

Source§

impl PartialReflect for ScreenSpaceTransmissionQuality

Source§

impl PartialReflect for Screenshot

Source§

impl PartialReflect for ScreenshotCaptured

Source§

impl PartialReflect for Scroll

Source§

impl PartialReflect for ScrollArea

Source§

impl PartialReflect for ScrollPosition

Source§

impl PartialReflect for Scrollbar

Source§

impl PartialReflect for ScrollbarDragState

Source§

impl PartialReflect for ScrollbarThumb

Source§

impl PartialReflect for Segment2d

Source§

impl PartialReflect for Segment3d

Source§

impl PartialReflect for SelectAllOnFocus

Source§

impl PartialReflect for Sensitivity

Source§

impl PartialReflect for SetChecked

Source§

impl PartialReflect for SetSliderValue

Source§

impl PartialReflect for ShaderBuffer

Source§

impl PartialReflect for ShadowFilteringMethod

Source§

impl PartialReflect for ShadowLodOrigin

Source§

impl PartialReflect for ShadowStyle

Source§

impl PartialReflect for ShowAabbGizmo

Source§

impl PartialReflect for ShowFrustumGizmo

Source§

impl PartialReflect for ShowLightGizmo

Source§

impl PartialReflect for ShowSkinnedMeshBoundsGizmo

Source§

impl PartialReflect for SimplifiedMesh

Source§

impl PartialReflect for SkinnedMesh

Source§

impl PartialReflect for SkinnedMeshBounds

Source§

impl PartialReflect for SkinnedMeshBoundsGizmoConfigGroup

Source§

impl PartialReflect for Skybox

Source§

impl PartialReflect for SliceScaleMode

Source§

impl PartialReflect for Slider

Source§

impl PartialReflect for SliderBaseColor

Source§

impl PartialReflect for SliderDragState

Source§

impl PartialReflect for SliderOrientation

Source§

impl PartialReflect for SliderPrecision

Source§

impl PartialReflect for SliderRange

Source§

impl PartialReflect for SliderStep

Source§

impl PartialReflect for SliderThumb

Source§

impl PartialReflect for SliderValue

Source§

impl PartialReflect for SliderValueChange

Source§

impl PartialReflect for Smaa

Source§

impl PartialReflect for SmaaPreset

Source§

impl PartialReflect for SolariLighting

Source§

impl PartialReflect for SpatialListener

Source§

impl PartialReflect for SpatialScale

Source§

impl PartialReflect for bevy::prelude::Sphere

Source§

impl PartialReflect for bevy::camera::primitives::Sphere

Source§

impl PartialReflect for SphereKind

Source§

impl PartialReflect for SphereMeshBuilder

Source§

impl PartialReflect for SpotLight

Source§

impl PartialReflect for SpotLightTexture

Source§

impl PartialReflect for Sprite

Source§

impl PartialReflect for SpriteAlphaMode

Source§

impl PartialReflect for SpriteImageMode

Source§

impl PartialReflect for SpriteMaterial

Source§

impl PartialReflect for SpriteMesh

Source§

impl PartialReflect for SpritePickingCamera

Source§

impl PartialReflect for SpritePickingMode

Source§

impl PartialReflect for SpritePickingSettings

Source§

impl PartialReflect for SpriteScalingMode

Source§

impl PartialReflect for Srgba

Source§

impl PartialReflect for StandardMaterial

Source§

impl PartialReflect for StaticTransformOptimizations

Source§

impl PartialReflect for Stopwatch

Source§

impl PartialReflect for Strikethrough

Source§

impl PartialReflect for StrikethroughColor

Source§

impl PartialReflect for String

Source§

impl PartialReflect for SubCameraView

Source§

impl PartialReflect for SyncToRenderWorld

Source§

impl PartialReflect for SystemCursorIcon

Source§

impl PartialReflect for TabGroup

Source§

impl PartialReflect for TabIndex

Source§

impl PartialReflect for TemporalAntiAliasing

Source§

impl PartialReflect for TemporalJitter

Source§

impl PartialReflect for TemporaryRenderEntity

Source§

impl PartialReflect for Tetrahedron

Source§

impl PartialReflect for TetrahedronMeshBuilder

Source§

impl PartialReflect for Text

Source§

impl PartialReflect for Text2d

Source§

impl PartialReflect for Text2dShadow

Source§

impl PartialReflect for TextBackgroundColor

Source§

impl PartialReflect for TextBounds

Source§

impl PartialReflect for TextColor

Source§

impl PartialReflect for TextEdit

Source§

impl PartialReflect for TextEntity

Source§

impl PartialReflect for TextFont

Source§

impl PartialReflect for TextLayout

Source§

impl PartialReflect for TextLayoutInfo

Source§

impl PartialReflect for TextNodeFlags

Source§

impl PartialReflect for TextScroll

Source§

impl PartialReflect for TextShadow

Source§

impl PartialReflect for TextSpan

Source§

impl PartialReflect for TextureAtlas

Source§

impl PartialReflect for TextureAtlasLayout

Source§

impl PartialReflect for TextureFormat

Source§

impl PartialReflect for TextureSlicer

Source§

impl PartialReflect for ThemeBackgroundColor

Source§

impl PartialReflect for ThemeBorderColor

Source§

impl PartialReflect for ThemeProps

Source§

impl PartialReflect for ThemeTextColor

Source§

impl PartialReflect for ThemeToken

Source§

impl PartialReflect for ThemedText

Source§

impl PartialReflect for ThreadedAnimationGraph

Source§

impl PartialReflect for ThreadedAnimationGraphs

Source§

impl PartialReflect for Tick

Source§

impl PartialReflect for TileData

Source§

impl PartialReflect for TileOrientation

Source§

impl PartialReflect for TilemapChunk

Source§

impl PartialReflect for TilemapChunkMeshCache

Source§

impl PartialReflect for TilemapChunkTileData

Source§

impl PartialReflect for Timer

Source§

impl PartialReflect for TimerMode

Source§

impl PartialReflect for ToggleChecked

Source§

impl PartialReflect for Tonemapping

Source§

impl PartialReflect for Torus

Source§

impl PartialReflect for TorusMeshBuilder

Source§

impl PartialReflect for TouchInput

Source§

impl PartialReflect for TouchPhase

Source§

impl PartialReflect for TrackClick

Source§

impl PartialReflect for Transform

Source§

impl PartialReflect for TransformGizmoAxis

Source§

impl PartialReflect for TransformGizmoCamera

Source§

impl PartialReflect for TransformGizmoFocus

Source§

impl PartialReflect for TransformGizmoMode

Source§

impl PartialReflect for TransformGizmoSettings

Source§

impl PartialReflect for TransformGizmoSpace

Source§

impl PartialReflect for TransformGizmoState

Source§

impl PartialReflect for TransformTreeChanged

Source§

impl PartialReflect for TransmittedShadowReceiver

Source§

impl PartialReflect for Triangle2d

Source§

impl PartialReflect for Triangle2dMeshBuilder

Source§

impl PartialReflect for Triangle3d

Source§

impl PartialReflect for Triangle3dMeshBuilder

Source§

impl PartialReflect for U8Vec2

Source§

impl PartialReflect for U8Vec3

Source§

impl PartialReflect for U8Vec4

Source§

impl PartialReflect for U16Vec2

Source§

impl PartialReflect for U16Vec3

Source§

impl PartialReflect for U16Vec4

Source§

impl PartialReflect for U64Vec2

Source§

impl PartialReflect for U64Vec3

Source§

impl PartialReflect for U64Vec4

Source§

impl PartialReflect for URect

Source§

impl PartialReflect for UVec2

Source§

impl PartialReflect for UVec3

Source§

impl PartialReflect for UVec4

Source§

impl PartialReflect for UiAntiAlias

Source§

impl PartialReflect for UiDebugOptions

Source§

impl PartialReflect for UiGlobalTransform

Source§

impl PartialReflect for UiPickingCamera

Source§

impl PartialReflect for UiPickingSettings

Source§

impl PartialReflect for UiPosition

Source§

impl PartialReflect for UiRect

Source§

impl PartialReflect for UiScale

Source§

impl PartialReflect for UiStack

Source§

impl PartialReflect for UiTargetCamera

Source§

impl PartialReflect for UiTheme

Source§

impl PartialReflect for UiTransform

Source§

impl PartialReflect for Underline

Source§

impl PartialReflect for UnderlineColor

Source§

impl PartialReflect for UntypedAssetId

Source§

impl PartialReflect for UntypedHandle

Source§

impl PartialReflect for UpdateNumberInput

Source§

impl PartialReflect for Uuid

Source§

impl PartialReflect for UvChannel

Source§

impl PartialReflect for Val

Source§

impl PartialReflect for Val2

Source§

impl PartialReflect for Vec2

Source§

impl PartialReflect for Vec3

Source§

impl PartialReflect for Vec4

Source§

impl PartialReflect for Vec3A

Source§

impl PartialReflect for VideoMode

Source§

impl PartialReflect for VideoModeSelection

Source§

impl PartialReflect for ViewFrustum

Source§

impl PartialReflect for ViewVisibility

Source§

impl PartialReflect for Viewport

Source§

impl PartialReflect for ViewportNode

Source§

impl PartialReflect for Vignette

Source§

impl PartialReflect for Virtual

Source§

impl PartialReflect for Visibility

Source§

impl PartialReflect for VisibilityClass

Source§

impl PartialReflect for VisibilityRange

Source§

impl PartialReflect for VisibleEntities

Source§

impl PartialReflect for VisibleMeshEntities

Source§

impl PartialReflect for VisualBox

Source§

impl PartialReflect for Volume

Source§

impl PartialReflect for VolumetricFog

Source§

impl PartialReflect for VolumetricLight

Source§

impl PartialReflect for WeightsCurveSample

Source§

impl PartialReflect for Window

Source§

impl PartialReflect for WindowBackendScaleFactorChanged

Source§

impl PartialReflect for WindowCloseRequested

Source§

impl PartialReflect for WindowClosed

Source§

impl PartialReflect for WindowClosing

Source§

impl PartialReflect for WindowCreated

Source§

impl PartialReflect for WindowDestroyed

Source§

impl PartialReflect for WindowEvent

Source§

impl PartialReflect for WindowFocused

Source§

impl PartialReflect for WindowLevel

Source§

impl PartialReflect for WindowMode

Source§

impl PartialReflect for WindowMoved

Source§

impl PartialReflect for WindowOccluded

Source§

impl PartialReflect for WindowPosition

Source§

impl PartialReflect for WindowRef

Source§

impl PartialReflect for WindowResizeConstraints

Source§

impl PartialReflect for WindowResized

Source§

impl PartialReflect for WindowResolution

Source§

impl PartialReflect for WindowScaleFactorChanged

Source§

impl PartialReflect for WindowTheme

Source§

impl PartialReflect for WindowThemeChanged

Source§

impl PartialReflect for WinitUserEvent

Source§

impl PartialReflect for Wireframe

Source§

impl PartialReflect for Wireframe2d

Source§

impl PartialReflect for Wireframe2dColor

Source§

impl PartialReflect for Wireframe2dConfig

Source§

impl PartialReflect for Wireframe2dMaterial

Source§

impl PartialReflect for WireframeColor

Source§

impl PartialReflect for WireframeConfig

Source§

impl PartialReflect for WireframeLineWidth

Source§

impl PartialReflect for WireframeMaterial

Source§

impl PartialReflect for WireframeTopology

Source§

impl PartialReflect for WorldAssetRoot

Source§

impl PartialReflect for WorldInstanceReady

Source§

impl PartialReflect for Xyza

Source§

impl PartialReflect for ZIndex

Source§

impl<'a> PartialReflect for Access<'a>
where Access<'a>: 'static,

Source§

impl<'a> PartialReflect for AssetPath<'a>
where AssetPath<'a>: 'static,

Source§

impl<A> PartialReflect for AnimatableCurveEvaluator<A>
where A: Animatable + TypePath, AnimatableCurveEvaluator<A>: Any + Send + Sync, BasicAnimationCurveEvaluator<A>: FromReflect + TypePath + MaybeTyped + RegisterForReflection, Box<dyn AnimatableProperty<Property = A>>: FromReflect + TypePath + MaybeTyped + RegisterForReflection,

Source§

impl<A> PartialReflect for AssetEvent<A>
where A: Asset + TypePath, AssetEvent<A>: Any + Send + Sync, AssetId<A>: FromReflect + TypePath + MaybeTyped + RegisterForReflection,

Source§

impl<A> PartialReflect for AssetId<A>
where A: Asset + TypePath, AssetId<A>: Any + Send + Sync,

Source§

impl<A> PartialReflect for Handle<A>
where A: Asset + TypePath, Handle<A>: Any + Send + Sync,

Source§

impl<B, E> PartialReflect for ExtendedMaterial<B, E>
where B: Material + FromReflect + TypePath + MaybeTyped + RegisterForReflection, E: MaterialExtension + FromReflect + TypePath + MaybeTyped + RegisterForReflection, ExtendedMaterial<B, E>: Any + Send + Sync,

Source§

impl<C> PartialReflect for Inherited<C>
where C: Component + Clone + PartialEq + TypePath + FromReflect + MaybeTyped + RegisterForReflection, Inherited<C>: Any + Send + Sync,

Source§

impl<C> PartialReflect for Propagate<C>
where C: Component + Clone + PartialEq + TypePath + FromReflect + MaybeTyped + RegisterForReflection, Propagate<C>: Any + Send + Sync,

Source§

impl<C> PartialReflect for PropagateOver<C>
where PropagateOver<C>: Any + Send + Sync, C: TypePath, PhantomData<fn() -> C>: FromReflect + TypePath + MaybeTyped + RegisterForReflection,

Source§

impl<C> PartialReflect for PropagateStop<C>
where PropagateStop<C>: Any + Send + Sync, C: TypePath, PhantomData<fn() -> C>: FromReflect + TypePath + MaybeTyped + RegisterForReflection,

Source§

impl<C> PartialReflect for SampleDerivativeWrapper<C>
where SampleDerivativeWrapper<C>: Any + Send + Sync, C: TypePath + PartialReflect + MaybeTyped + RegisterForReflection,

Source§

impl<C> PartialReflect for SampleTwoDerivativesWrapper<C>
where SampleTwoDerivativesWrapper<C>: Any + Send + Sync, C: TypePath + PartialReflect + MaybeTyped + RegisterForReflection,

Source§

impl<C> PartialReflect for WeightsCurve<C>
where WeightsCurve<C>: Any + Send + Sync, C: TypePath + PartialReflect + MaybeTyped + RegisterForReflection,

Source§

impl<Config, Clear> PartialReflect for GizmoBuffer<Config, Clear>
where GizmoBuffer<Config, Clear>: Any + Send + Sync, Config: GizmoConfigGroup + TypePath, Clear: 'static + Send + Sync + TypePath,

Source§

impl<E> PartialReflect for Pointer<E>
where E: Debug + Clone + Reflect + TypePath + FromReflect + MaybeTyped + RegisterForReflection, Pointer<E>: Any + Send + Sync,

Source§

impl<K, V, S> PartialReflect for bevy::platform::collections::HashMap<K, V, S>

Source§

impl<M> PartialReflect for FocusedInput<M>
where M: Message + Clone + TypePath + FromReflect + MaybeTyped + RegisterForReflection, FocusedInput<M>: Any + Send + Sync,

Source§

impl<M> PartialReflect for MaterialNode<M>
where M: UiMaterial + TypePath, MaterialNode<M>: Any + Send + Sync, Handle<M>: FromReflect + TypePath + MaybeTyped + RegisterForReflection,

Source§

impl<M> PartialReflect for MeshMaterial2d<M>
where M: Material2d + TypePath, MeshMaterial2d<M>: Any + Send + Sync, Handle<M>: FromReflect + TypePath + MaybeTyped + RegisterForReflection,

Source§

impl<M> PartialReflect for MeshMaterial3d<M>
where M: Material + TypePath, MeshMaterial3d<M>: Any + Send + Sync, Handle<M>: FromReflect + TypePath + MaybeTyped + RegisterForReflection,

Source§

impl<M> PartialReflect for MessageId<M>
where M: Message + TypePath, MessageId<M>: Any + Send + Sync,

Source§

impl<M> PartialReflect for Messages<M>
where M: Message + TypePath, Messages<M>: Any + Send + Sync, MessageSequence<M>: FromReflect + TypePath + MaybeTyped + RegisterForReflection,

Source§

impl<P, C> PartialReflect for AnimatableCurve<P, C>
where AnimatableCurve<P, C>: Any + Send + Sync, P: TypePath + PartialReflect + MaybeTyped + RegisterForReflection, C: TypePath + PartialReflect + MaybeTyped + RegisterForReflection,

Source§

impl<P> PartialReflect for CubicBSpline<P>
where P: VectorSpace + TypePath, CubicBSpline<P>: Any + Send + Sync, Vec<P>: FromReflect + TypePath + MaybeTyped + RegisterForReflection,

Source§

impl<P> PartialReflect for CubicBezier<P>
where P: VectorSpace + TypePath, CubicBezier<P>: Any + Send + Sync, Vec<[P; 4]>: FromReflect + TypePath + MaybeTyped + RegisterForReflection,

Source§

impl<P> PartialReflect for CubicCardinalSpline<P>
where P: VectorSpace + TypePath, CubicCardinalSpline<P>: Any + Send + Sync, Vec<P>: FromReflect + TypePath + MaybeTyped + RegisterForReflection,

Source§

impl<P> PartialReflect for CubicCurve<P>
where P: VectorSpace + TypePath, CubicCurve<P>: Any + Send + Sync, Vec<CubicSegment<P>>: FromReflect + TypePath + MaybeTyped + RegisterForReflection,

Source§

impl<P> PartialReflect for CubicHermite<P>
where P: VectorSpace + TypePath, CubicHermite<P>: Any + Send + Sync, Vec<(P, P)>: FromReflect + TypePath + MaybeTyped + RegisterForReflection,

Source§

impl<P> PartialReflect for CubicNurbs<P>
where P: VectorSpace + TypePath, CubicNurbs<P>: Any + Send + Sync, Vec<P>: FromReflect + TypePath + MaybeTyped + RegisterForReflection,

Source§

impl<P> PartialReflect for CubicSegment<P>
where P: VectorSpace + TypePath, CubicSegment<P>: Any + Send + Sync, [P; 4]: FromReflect + TypePath + MaybeTyped + RegisterForReflection,

Source§

impl<P> PartialReflect for LinearSpline<P>
where P: VectorSpace + TypePath, LinearSpline<P>: Any + Send + Sync, Vec<P>: FromReflect + TypePath + MaybeTyped + RegisterForReflection,

Source§

impl<P> PartialReflect for RationalCurve<P>
where P: VectorSpace + TypePath, RationalCurve<P>: Any + Send + Sync, Vec<RationalSegment<P>>: FromReflect + TypePath + MaybeTyped + RegisterForReflection,

Source§

impl<P> PartialReflect for RationalSegment<P>
where P: VectorSpace + TypePath, RationalSegment<P>: Any + Send + Sync, [P; 4]: FromReflect + TypePath + MaybeTyped + RegisterForReflection,

Source§

impl<S, T, C, D> PartialReflect for ZipCurve<S, T, C, D>
where ZipCurve<S, T, C, D>: Any + Send + Sync, S: TypePath, T: TypePath, C: TypePath + PartialReflect + MaybeTyped + RegisterForReflection, D: TypePath + PartialReflect + MaybeTyped + RegisterForReflection,

Source§

impl<S, T, C, F> PartialReflect for MapCurve<S, T, C, F>
where MapCurve<S, T, C, F>: Any + Send + Sync, C: PartialReflect + TypePath + MaybeTyped + RegisterForReflection, S: TypePath, T: TypePath,

Source§

impl<S> PartialReflect for DespawnOnEnter<S>
where S: States + TypePath + FromReflect + MaybeTyped + RegisterForReflection, DespawnOnEnter<S>: Any + Send + Sync,

Source§

impl<S> PartialReflect for DespawnOnExit<S>
where S: States + TypePath + FromReflect + MaybeTyped + RegisterForReflection, DespawnOnExit<S>: Any + Send + Sync,

Source§

impl<S> PartialReflect for DespawnWhen<S>
where S: States + TypePath, DespawnWhen<S>: Any + Send + Sync, Box<dyn Fn(&StateTransitionEvent<S>) -> bool + Sync + Send>: FromReflect + TypePath + MaybeTyped + RegisterForReflection,

Source§

impl<S> PartialReflect for DisableOnEnter<S>
where S: States + TypePath + FromReflect + MaybeTyped + RegisterForReflection, DisableOnEnter<S>: Any + Send + Sync,

Source§

impl<S> PartialReflect for DisableOnExit<S>
where S: States + TypePath + FromReflect + MaybeTyped + RegisterForReflection, DisableOnExit<S>: Any + Send + Sync,

Source§

impl<S> PartialReflect for DisableWhen<S>
where S: States + TypePath, DisableWhen<S>: Any + Send + Sync, Box<dyn Fn(&StateTransitionEvent<S>) -> bool + Sync + Send>: FromReflect + TypePath + MaybeTyped + RegisterForReflection,

Source§

impl<S> PartialReflect for EnableOnEnter<S>
where S: States + TypePath + FromReflect + MaybeTyped + RegisterForReflection, EnableOnEnter<S>: Any + Send + Sync,

Source§

impl<S> PartialReflect for EnableOnExit<S>
where S: States + TypePath + FromReflect + MaybeTyped + RegisterForReflection, EnableOnExit<S>: Any + Send + Sync,

Source§

impl<S> PartialReflect for EnableWhen<S>
where S: States + TypePath, EnableWhen<S>: Any + Send + Sync, Box<dyn Fn(&StateTransitionEvent<S>) -> bool + Sync + Send>: FromReflect + TypePath + MaybeTyped + RegisterForReflection,

Source§

impl<S> PartialReflect for NextState<S>
where S: FreelyMutableState + TypePath + FromReflect + MaybeTyped + RegisterForReflection, NextState<S>: Any + Send + Sync,

Source§

impl<S> PartialReflect for PreviousState<S>
where S: States + TypePath + FromReflect + MaybeTyped + RegisterForReflection, PreviousState<S>: Any + Send + Sync,

Source§

impl<S> PartialReflect for State<S>
where S: States + TypePath + FromReflect + MaybeTyped + RegisterForReflection, State<S>: Any + Send + Sync,

Source§

impl<Source> PartialReflect for AudioPlayer<Source>
where AudioPlayer<Source>: Any + Send + Sync, Source: Asset + Decodable + TypePath, Handle<Source>: FromReflect + TypePath + MaybeTyped + RegisterForReflection,

Source§

impl<T, C, D> PartialReflect for ChainCurve<T, C, D>
where ChainCurve<T, C, D>: Any + Send + Sync, T: TypePath, C: TypePath + PartialReflect + MaybeTyped + RegisterForReflection, D: TypePath + PartialReflect + MaybeTyped + RegisterForReflection,

Source§

impl<T, C, D> PartialReflect for ContinuationCurve<T, C, D>
where ContinuationCurve<T, C, D>: Any + Send + Sync, T: TypePath + PartialReflect + MaybeTyped + RegisterForReflection, C: TypePath + PartialReflect + MaybeTyped + RegisterForReflection, D: TypePath + PartialReflect + MaybeTyped + RegisterForReflection,

Source§

impl<T, C, D> PartialReflect for CurveReparamCurve<T, C, D>
where CurveReparamCurve<T, C, D>: Any + Send + Sync, T: TypePath, C: TypePath + PartialReflect + MaybeTyped + RegisterForReflection, D: TypePath + PartialReflect + MaybeTyped + RegisterForReflection,

Source§

impl<T, C, F> PartialReflect for ReparamCurve<T, C, F>
where ReparamCurve<T, C, F>: Any + Send + Sync, C: PartialReflect + TypePath + MaybeTyped + RegisterForReflection, T: TypePath,

Source§

impl<T, C> PartialReflect for ForeverCurve<T, C>
where ForeverCurve<T, C>: Any + Send + Sync, T: TypePath, C: TypePath + PartialReflect + MaybeTyped + RegisterForReflection,

Source§

impl<T, C> PartialReflect for GraphCurve<T, C>
where GraphCurve<T, C>: Any + Send + Sync, T: TypePath, C: TypePath + PartialReflect + MaybeTyped + RegisterForReflection,

Source§

impl<T, C> PartialReflect for LinearReparamCurve<T, C>
where LinearReparamCurve<T, C>: Any + Send + Sync, T: TypePath, C: TypePath + PartialReflect + MaybeTyped + RegisterForReflection,

Source§

impl<T, C> PartialReflect for PingPongCurve<T, C>
where PingPongCurve<T, C>: Any + Send + Sync, T: TypePath, C: TypePath + PartialReflect + MaybeTyped + RegisterForReflection,

Source§

impl<T, C> PartialReflect for RepeatCurve<T, C>
where RepeatCurve<T, C>: Any + Send + Sync, T: TypePath, C: TypePath + PartialReflect + MaybeTyped + RegisterForReflection,

Source§

impl<T, C> PartialReflect for ReverseCurve<T, C>
where ReverseCurve<T, C>: Any + Send + Sync, T: TypePath, C: TypePath + PartialReflect + MaybeTyped + RegisterForReflection,

Source§

impl<T, F> PartialReflect for FunctionCurve<T, F>
where FunctionCurve<T, F>: Any + Send + Sync, T: TypePath,

Source§

impl<T, H> PartialReflect for Hashed<T, H>
where T: Clone + Send + Sync + TypePath, H: Send + Sync + TypePath, Hashed<T, H>: Any + Send + Sync,

Source§

impl<T, I> PartialReflect for SampleCurve<T, I>
where SampleCurve<T, I>: Any + Send + Sync, EvenCore<T>: PartialReflect + TypePath + MaybeTyped + RegisterForReflection, T: TypePath,

Source§

impl<T, I> PartialReflect for UnevenSampleCurve<T, I>
where UnevenSampleCurve<T, I>: Any + Send + Sync, UnevenCore<T>: PartialReflect + TypePath + MaybeTyped + RegisterForReflection, T: TypePath,

Source§

impl<T> PartialReflect for AnimatableKeyframeCurve<T>
where AnimatableKeyframeCurve<T>: Any + Send + Sync, T: TypePath, UnevenCore<T>: FromReflect + TypePath + MaybeTyped + RegisterForReflection,

Source§

impl<T> PartialReflect for Arc<T>
where T: Send + Sync + TypePath + ?Sized, Arc<T>: Any + Send + Sync,

Source§

impl<T> PartialReflect for ArcMutexValue<T>
where T: Asset + TypePath, ArcMutexValue<T>: Any + Send + Sync,

Source§

impl<T> PartialReflect for Axis<T>
where Axis<T>: Any + Send + Sync, T: TypePath, HashMap<T, f32>: FromReflect + TypePath + MaybeTyped + RegisterForReflection,

Source§

impl<T> PartialReflect for ButtonInput<T>
where T: Clone + Eq + Hash + Send + Sync + 'static + TypePath, ButtonInput<T>: Any + Send + Sync, HashSet<T>: FromReflect + TypePath + MaybeTyped + RegisterForReflection,

Source§

impl<T> PartialReflect for ChunkedUnevenCore<T>
where ChunkedUnevenCore<T>: Any + Send + Sync, T: TypePath, Vec<T>: FromReflect + TypePath + MaybeTyped + RegisterForReflection,

Source§

impl<T> PartialReflect for ColorCurve<T>
where ColorCurve<T>: Any + Send + Sync, T: TypePath, EvenCore<T>: FromReflect + TypePath + MaybeTyped + RegisterForReflection,

Source§

impl<T> PartialReflect for ConstantCurve<T>
where ConstantCurve<T>: Any + Send + Sync, T: TypePath + FromReflect + MaybeTyped + RegisterForReflection,

Source§

impl<T> PartialReflect for CubicKeyframeCurve<T>
where CubicKeyframeCurve<T>: Any + Send + Sync, T: TypePath, ChunkedUnevenCore<T>: FromReflect + TypePath + MaybeTyped + RegisterForReflection,

Source§

impl<T> PartialReflect for EasingCurve<T>
where EasingCurve<T>: Any + Send + Sync, T: TypePath + FromReflect + MaybeTyped + RegisterForReflection,

Source§

impl<T> PartialReflect for EvenCore<T>
where EvenCore<T>: Any + Send + Sync, T: TypePath, Vec<T>: FromReflect + TypePath + MaybeTyped + RegisterForReflection,

Source§

impl<T> PartialReflect for HandleTemplate<T>
where T: Asset + TypePath, HandleTemplate<T>: Any + Send + Sync, Handle<T>: FromReflect + TypePath + MaybeTyped + RegisterForReflection, ArcMutexValue<T>: FromReflect + TypePath + MaybeTyped + RegisterForReflection,

Source§

impl<T> PartialReflect for Interned<T>
where T: Internable + 'static + TypePath + ?Sized, Interned<T>: Any + Send + Sync, &'static T: FromReflect + TypePath + MaybeTyped + RegisterForReflection,

Source§

impl<T> PartialReflect for InterpolationDatum<T>
where InterpolationDatum<T>: Any + Send + Sync, T: TypePath + FromReflect + MaybeTyped + RegisterForReflection,

Source§

impl<T> PartialReflect for MaybeLocation<T>
where MaybeLocation<T>: Any + Send + Sync, T: TypePath + FromReflect + MaybeTyped + RegisterForReflection + ?Sized,

Source§

impl<T> PartialReflect for SampleAutoCurve<T>
where SampleAutoCurve<T>: Any + Send + Sync, T: TypePath, EvenCore<T>: FromReflect + TypePath + MaybeTyped + RegisterForReflection,

Source§

impl<T> PartialReflect for SteppedKeyframeCurve<T>
where SteppedKeyframeCurve<T>: Any + Send + Sync, T: TypePath, UnevenCore<T>: FromReflect + TypePath + MaybeTyped + RegisterForReflection,

Source§

impl<T> PartialReflect for Time<T>
where T: Default + TypePath + FromReflect + MaybeTyped + RegisterForReflection, Time<T>: Any + Send + Sync,

Source§

impl<T> PartialReflect for UnevenCore<T>
where UnevenCore<T>: Any + Send + Sync, T: TypePath, Vec<T>: FromReflect + TypePath + MaybeTyped + RegisterForReflection,

Source§

impl<T> PartialReflect for UnevenSampleAutoCurve<T>
where UnevenSampleAutoCurve<T>: Any + Send + Sync, T: TypePath, UnevenCore<T>: FromReflect + TypePath + MaybeTyped + RegisterForReflection,

Source§

impl<T> PartialReflect for ValueChange<T>
where ValueChange<T>: Any + Send + Sync, T: TypePath + FromReflect + MaybeTyped + RegisterForReflection,

Source§

impl<T> PartialReflect for Vec<T>
where T: FromReflect + MaybeTyped + TypePath + GetTypeRegistration,

Source§

impl<T> PartialReflect for VirtualKeyPressed<T>
where VirtualKeyPressed<T>: Any + Send + Sync, T: TypePath + FromReflect + MaybeTyped + RegisterForReflection,

Source§

impl<T> PartialReflect for VirtualKeyboard<T>
where T: AsRef<str> + Clone + Send + Sync + 'static + TypePath, VirtualKeyboard<T>: Any + Send + Sync, PhantomData<fn() -> T>: FromReflect + TypePath + MaybeTyped + RegisterForReflection,

Source§

impl<T> PartialReflect for WideCubicKeyframeCurve<T>
where WideCubicKeyframeCurve<T>: Any + Send + Sync, T: TypePath, ChunkedUnevenCore<T>: FromReflect + TypePath + MaybeTyped + RegisterForReflection,

Source§

impl<T> PartialReflect for WideLinearKeyframeCurve<T>
where WideLinearKeyframeCurve<T>: Any + Send + Sync, T: TypePath, ChunkedUnevenCore<T>: FromReflect + TypePath + MaybeTyped + RegisterForReflection,

Source§

impl<T> PartialReflect for WideSteppedKeyframeCurve<T>
where WideSteppedKeyframeCurve<T>: Any + Send + Sync, T: TypePath, ChunkedUnevenCore<T>: FromReflect + TypePath + MaybeTyped + RegisterForReflection,

Source§

impl<T> PartialReflect for WithDerivative<T>
where WithDerivative<T>: Any + Send + Sync, T: HasTangent + TypePath + FromReflect + MaybeTyped + RegisterForReflection, <T as HasTangent>::Tangent: FromReflect + TypePath + MaybeTyped + RegisterForReflection,

Source§

impl<T> PartialReflect for WithTwoDerivatives<T>
where WithTwoDerivatives<T>: Any + Send + Sync, T: HasTangent + TypePath + FromReflect + MaybeTyped + RegisterForReflection, <T as HasTangent>::Tangent: FromReflect + TypePath + MaybeTyped + RegisterForReflection, <<T as HasTangent>::Tangent as HasTangent>::Tangent: FromReflect + TypePath + MaybeTyped + RegisterForReflection,

Source§

impl<V, S> PartialReflect for bevy::platform::collections::HashSet<V, S>

Source§

impl<V, W> PartialReflect for Sum<V, W>
where Sum<V, W>: Any + Send + Sync, V: TypePath + FromReflect + MaybeTyped + RegisterForReflection, W: TypePath + FromReflect + MaybeTyped + RegisterForReflection,

Source§

impl<V> PartialReflect for EntityHashMap<V>
where EntityHashMap<V>: Any + Send + Sync, V: TypePath, HashMap<Entity, V, EntityHash>: FromReflect + TypePath + MaybeTyped + RegisterForReflection,

Source§

impl<V> PartialReflect for EntityIndexMap<V>
where EntityIndexMap<V>: Any + Send + Sync, V: TypePath, IndexMap<Entity, V, EntityHash>: FromReflect + TypePath + MaybeTyped + RegisterForReflection,