1 // Protocol Buffers - Google's data interchange format 2 // Copyright 2023 Google LLC. All rights reserved. 3 // 4 // Use of this source code is governed by a BSD-style 5 // license that can be found in the LICENSE file or at 6 // https://developers.google.com/open-source/licenses/bsd 7 8 #ifndef GOOGLE_PROTOBUF_COMPILER_RUST_ONEOF_H__ 9 #define GOOGLE_PROTOBUF_COMPILER_RUST_ONEOF_H__ 10 11 #include "google/protobuf/compiler/rust/accessors/accessor_case.h" 12 #include "google/protobuf/compiler/rust/context.h" 13 #include "google/protobuf/descriptor.h" 14 15 namespace google { 16 namespace protobuf { 17 namespace compiler { 18 namespace rust { 19 20 void GenerateOneofDefinition(Context& ctx, const OneofDescriptor& oneof); 21 void GenerateOneofAccessors(Context& ctx, const OneofDescriptor& oneof, 22 AccessorCase accessor_case); 23 void GenerateOneofExternC(Context& ctx, const OneofDescriptor& oneof); 24 void GenerateOneofThunkCc(Context& ctx, const OneofDescriptor& oneof); 25 26 } // namespace rust 27 } // namespace compiler 28 } // namespace protobuf 29 } // namespace google 30 31 #endif // GOOGLE_PROTOBUF_COMPILER_RUST_ONEOF_H__ 32