Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

All components should implement From<InnerDatatype> in Rust backend #2675

Closed
Tracked by #2646
teh-cmc opened this issue Jul 11, 2023 · 0 comments · Fixed by #2772
Closed
Tracked by #2646

All components should implement From<InnerDatatype> in Rust backend #2675

teh-cmc opened this issue Jul 11, 2023 · 0 comments · Fixed by #2772
Labels
codegen/idl 🧑‍💻 dev experience developer experience (excluding CI) 🦀 Rust API Rust logging API

Comments

@teh-cmc
Copy link
Member

teh-cmc commented Jul 11, 2023

Since we now treat components as merely a tag on top of a datatype, there is always a trivial conversion that exists between a component and its underlying datatype, namely:

impl From<InnerDatatype> for OuterComponent {
    pub fn from(inner: InnerDatatype) -> Self {
        Self(inner)
    }
}

Similarly, there doesn't seem to be any reason for a component not to be attr.rerun.tuple_struct at this point.

@teh-cmc teh-cmc added 🧑‍💻 dev experience developer experience (excluding CI) codegen/idl 🦀 Rust API Rust logging API labels Jul 11, 2023
teh-cmc added a commit that referenced this issue Jul 21, 2023
…re possible (#2772)

**Commit by commit!**

What the title says.

Fixes #2675
Fixes #2771 

### What

### Checklist
* [x] I have read and agree to [Contributor
Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and
the [Code of
Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md)
* [x] I've included a screenshot or gif (if applicable)
* [x] I have tested [demo.rerun.io](https://demo.rerun.io/pr/2772) (if
applicable)

- [PR Build Summary](https://build.rerun.io/pr/2772)
- [Docs
preview](https://rerun.io/preview/pr%3Acmc%2Fnicer_components_rust/docs)
- [Examples
preview](https://rerun.io/preview/pr%3Acmc%2Fnicer_components_rust/examples)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
codegen/idl 🧑‍💻 dev experience developer experience (excluding CI) 🦀 Rust API Rust logging API
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant