Implement `ToTokens` on `RsTypeKind`, making it usable in-place as something that can be formatted.

This renders `RsTypeKind` into a full replacement for `TokenStream`: anywhere you're throwing around serialized tokens, you can instead pass around an `RsTypeKind` as structured data, preserving understanding of the underlying source / AST. It also makes formatting slightly less code.

This does somewhat move against the direction suggested in the code, where it suggests we may want to in the future return `RsSnippet`. But one could just as easily imagine deciding the format up-front at `RsTypeKind`-creation-time, and in fact that's already what we do for deciding the namespacing for Record. At any rate, YAGNI! better to simplify the interface now, and complexify it only later if necessary.

PiperOrigin-RevId: 439894243
1 file changed
tree: ab502992c177ef10542f6b3a0f2acafa3ccc90fd
  1. lifetime_annotations/
  2. rs_bindings_from_cc/
  3. BUILD
  4. CODE_OF_CONDUCT
  5. CONTRIBUTING
  6. LICENSE
  7. README.md
README.md

Crubit: C++/Rust Bidirectional Interop Tool

Extremely experimental interop tooling for C++ and Rust.

Please don‘t use, this is an experiment and we don’t yet know where will it take us. There will be breaking changes without warning. Unfortunately, we can't take contributions at this point.