Skip to content

get type id from the trait object #85314

Closed
@peacess

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

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