You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to implement a mapping of Box<T: 'static> to GType. That dynamic type system requires process-unique type names. So I'd like to have a process-unique key, preferably a string, available from TypeId or a similar API.
Now, it's likely that TyDesc names are sufficiently unique, and hash collisions on TypeId break the world as Rust knows it (#17179) so the u64 hash value can be used as practically unique, but: 1) uniqueness constraints on any of those are not documented; 2) access to TyDesc is unsafe.
The text was updated successfully, but these errors were encountered:
I'm pulling a massive triage effort to get us ready for 1.0. As part of this, I'm moving stuff that's wishlist-like to the RFCs repo, as that's where major new things should get discussed/prioritized.
I want to implement a mapping of
Box<T: 'static>
to GType. That dynamic type system requires process-unique type names. So I'd like to have a process-unique key, preferably a string, available fromTypeId
or a similar API.Now, it's likely that
TyDesc
names are sufficiently unique, and hash collisions onTypeId
break the world as Rust knows it (#17179) so theu64
hash value can be used as practically unique, but: 1) uniqueness constraints on any of those are not documented; 2) access toTyDesc
is unsafe.The text was updated successfully, but these errors were encountered: