• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Protocol Buffers - Google's data interchange format
2 // Copyright 2024 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_UPB_HELPERS_H__
9 #define GOOGLE_PROTOBUF_COMPILER_RUST_UPB_HELPERS_H__
10 
11 #include <cstdint>
12 #include <string>
13 
14 #include "google/protobuf/descriptor.h"
15 
16 namespace google {
17 namespace protobuf {
18 namespace compiler {
19 namespace rust {
20 
21 // The symbol name for the MiniTable generated by upb MiniTable C codegen.
22 std::string UpbMiniTableName(const Descriptor& msg);
23 
24 // The field index that the provided field will be in a upb_MiniTable.
25 uint32_t UpbMiniTableFieldIndex(const FieldDescriptor& field);
26 
27 }  // namespace rust
28 }  // namespace compiler
29 }  // namespace protobuf
30 }  // namespace google
31 
32 #endif  // GOOGLE_PROTOBUF_COMPILER_RUST_UPB_HELPERS_H__
33