Skip to content

get type id from the trait object #85314

Description

@peacess

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-discussionCategory: Discussion or questions that doesn't represent real issues.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions