mirror of
https://github.com/protocolbuffers/protobuf
synced 2026-08-26 02:23:14 -04:00
This change moves the `OwnedMessageInterop`, `MessageViewInterop`, and `MessageMutInterop` traits from `codegen_traits.rs` into new `interop.rs` files within both the `cpp_kernel` and `upb_kernel` directories. The `KernelMessage`, `KernelMessageView`, and `KernelMessageMut` traits in each kernel's `message.rs` are updated to include the respective kernel-specific interop traits. This ensures that the interop functionality is tied to the specific kernel implementation. The `shared.rs` module now re-exports the interop traits from `crate::__internal::runtime::interop`, which will resolve to the correct kernel's interop module. It would be possible to take this farther by making the interop traits return strongly typed pointers to `upb_Message*` and `proto2::MessageLite*` instead of `c_void`, but that would be a breaking change. PiperOrigin-RevId: 892470084 |
||
|---|---|---|
| .. | ||
| compare.cc | ||
| compare.h | ||
| debug.cc | ||
| debug.h | ||
| interop.rs | ||
| map.cc | ||
| map.rs | ||
| message.cc | ||
| message.rs | ||
| mod.rs | ||
| raw.rs | ||
| repeated.cc | ||
| repeated.rs | ||
| rust_alloc_for_cpp_api.h | ||
| rust_alloc_for_cpp_api.rs | ||
| serialized_data.h | ||
| string.rs | ||
| strings.cc | ||
| strings.h | ||