Make `Context` not generic, and reference it in `CoreInner`
Instead of using AsRef<LoopRef> + Clone
, this uses a new AsLoop
trait, which can be used to get a reference to the Rc
of the inner
type, that can be converted to a trait object for dynamic dispatch.
Referencing Context
in CoreInner
fixes
#64 and
#76.
The trait definition here is a little unusual, but I don't know if there's a better way to do this. Dynamic dispatch of some form or another is probably the correct thing to do.