I have an API that takes a type generic over the HasContext trait. It would be nice if you could also pass in &Context, Rc<Context> and other types in this way.
It would probably be a macro that implements HasContext over Rc<T>, &T and others as methods that are just forwarded to the inner HasContext implementation.
I have an API that takes a type generic over the
HasContext
trait. It would be nice if you could also pass in&Context
,Rc<Context>
and other types in this way.