Skip to content

Improve generated type conversions for components #4536

@jleibs

Description

@jleibs

It would be nice for components to generate a converter From their datatypes such as

impl<T: Into<::re_types_core::ArrowString>> From<T> for Name {
    fn from(v: T) -> Self {
        Self(v.into())
    }
}

However, doing so creates a conflict since the the already generated converter from the Component back to the datatype:

impl From<Name> for ::re_types_core::ArrowString {
    #[inline]
    fn from(value: Name) -> Self {
        value.0
    }
}

meets the bound and in turn creates a conflict with the core-provided impl<T> std::convert::From<T> for T;

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions