![]() # Objective Allow `Box<dyn Reflect>` to be converted into a `Box<dyn MyTrait>` using the `#[reflect_trait]` macro. The other methods `get` and `get_mut` only provide a reference to the reflected object. ## Solution Add a `get_boxed` method to the `Reflect***` struct generated by the `#[reflect_trait]` macro. This method takes in a `Box<dyn Reflect>` and returns a `Box<dyn MyTrait>`. Co-authored-by: MrGVSV <49806985+MrGVSV@users.noreply.github.com> |
||
---|---|---|
.. | ||
container_attributes.rs | ||
derive_data.rs | ||
field_attributes.rs | ||
from_reflect.rs | ||
impls.rs | ||
lib.rs | ||
reflect_value.rs | ||
registration.rs | ||
trait_reflection.rs | ||
type_uuid.rs | ||
utility.rs |