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
pub fn get_data_type_id() TypeId
if add the fn , then we can safety convert trait1 object to trait2 object
trait1 object include data and vtable1
trait2 object include data and vtable2
data + vtable1 + get_data_type_id() + trait2 ==>(safety) trait2 object
The text was updated successfully, but these errors were encountered:
There are multiple ways to support downcasting trait objects to different trait objects. Each has different advantages and disadvantages. There has been a lot of discussion about this in the past, but no proposal has been accepted yet. By the way internals.rust-lang.org is a more suitable location to discuss changes to the rust language.
Hi! Additions or changes to the language need to go through our RFC process. Before an RFC is written, the feature can also be discussed in our internals forum to find other people interested in it.
pub fn get_data_type_id() TypeId
if add the fn , then we can safety convert trait1 object to trait2 object
trait1 object include data and vtable1
trait2 object include data and vtable2
data + vtable1 + get_data_type_id() + trait2 ==>(safety) trait2 object
The text was updated successfully, but these errors were encountered: