This allows users to take Cx as an argument instead of being generic over the Context trait. For example, this will allow us to implement TryIntoJs for closures.
This is technically a breaking change because several context types have been replaced by type aliases; if a user were implementing a trait over multiple of these types, it would now cause a conflict. In practice, users either didn't do this at all or implemented it generically over the Context trait.
We could keep the existing types, it just makes it harder to deprecate them in the future. For a Neon 2.0, I would want to eliminate the Context trait and only make it concrete. The special needs of function and module would become additional arguments.
This allows users to take
Cx
as an argument instead of being generic over theContext
trait. For example, this will allow us to implementTryIntoJs
for closures.This is technically a breaking change because several context types have been replaced by type aliases; if a user were implementing a trait over multiple of these types, it would now cause a conflict. In practice, users either didn't do this at all or implemented it generically over the
Context
trait.We could keep the existing types, it just makes it harder to deprecate them in the future. For a Neon 2.0, I would want to eliminate the
Context
trait and only make it concrete. The special needs of function and module would become additional arguments.