anp / moxie

lightweight platform-agnostic tools for declarative UI
https://moxie.rs
Apache License 2.0
828 stars 27 forks source link

illicit should allow ?Debug types with a separate entrypoint #168

Open anp opened 4 years ago

anp commented 4 years ago

Layer::offer<T> requires T: Debug so we can clone an Rc of the type and get an Rc<dyn Debug> to store next to the Rc<dyn Any> that's used for downcasting. But! Thinking about it now, I don't think the two Rc's in AnonRc need to point to the exact same value.

Layer::offer_opaque should work just like Layer::offer but when creating AnonRc it should wrap the original Rc in a noop Debug wrapper.