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.
Layer::offer<T>
requiresT: Debug
so we can clone an Rc of the type and get anRc<dyn Debug>
to store next to theRc<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 likeLayer::offer
but when creating AnonRc it should wrap the original Rc in a noop Debug wrapper.