Is there a &'static _ equiv for Box<dyn Any>?

With a x: Box<dyn Any> we can try to convert it to any type via x.downcast::<T>().

Is there something similar for a &'static _ ? I.e. it's a reference that lives forever, to SOMETHING, but we downcast it later.

There is downcast_ref() for &dyn Any + 'static.

2 Likes

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.