Generated C++

1. #[cxx::bridge]
2. mod ffi {
3. // Rust types and signatures exposed to C++.
4. extern "Rust" {
5. type MultiBuf;

7. fn next_chunk(buf: &mut MultiBuf) -> &[u8];
8. }
9. }

Results in (roughly) the following C++:

1. struct MultiBuf final : public ::rust::Opaque {
2. ~MultiBuf() = delete;

4. private:
5. friend ::rust::layout;
6. struct layout {
7. static ::std::size_t size() noexcept;
8. static ::std::size_t align() noexcept;
9. };
10. };

12. ::rust::Slice<::std::uint8_t const> next_chunk(::org::blobstore::MultiBuf &buf) noexcept;