Closed ratmice closed 11 months ago
This is an RFC for something that I thought of in the #428 pull request, which codifies the notion of unstable traits and function calls.
Using methods similar to those described by the matrix at, using features to selectively lift the restrictions: https://predr.ag/blog/definitive-guide-to-sealed-traits-in-rust/
It migrates the couple of methods that are marked unstable in the documentation to take token values indicating their instability.
There are 2 variations of these,
InternalPublicApi
internal
UnstableApi
The UnstableTrait function/feature is currently unused, but could be useful for #428.
UnstableTrait
I think I like it, but I need to get my head around a couple of the implications -- I'll try and get back to you on this soon!
Please squash.
Squashed.
This is an RFC for something that I thought of in the #428 pull request, which codifies the notion of unstable traits and function calls.
Using methods similar to those described by the matrix at, using features to selectively lift the restrictions: https://predr.ag/blog/definitive-guide-to-sealed-traits-in-rust/
It migrates the couple of methods that are marked unstable in the documentation to take token values indicating their instability.
There are 2 variations of these,
InternalPublicApi
, that areinternal
, but public by default (used in generated code).UnstableApi
, require a feature to enable their visibility so that functions requiring the unstable token can be called.The
UnstableTrait
function/feature is currently unused, but could be useful for #428.