subspace
subspace copied to clipboard
Opaque<T> that can be converted to/from Vec<T>
From @noncombatant:
An opaque sequence type. For example, we often see IPC interfaces where the type is vector
Vec can impl From<Opaque> and Opaque can impl From<Vec>, so you can just into() them.
This puts the contract of "I don't use this" into the type system, instead of just in comments, which is a Good Thing.
It could also be a higher level chrome-thing instead of a sus thing, but if we can support into() in that mode. I need to verify we can, I think there's currently no way to have Opaque impl Into<Vec> without Vec's participation.