Download include/google/protobuf/compiler/rust/enum.h from Shenghong/dai_env: direct link, hf CLI and curl.
- Browser
- Download file 1.53 kB
-
https://huggingface.co/Shenghong/dai_env/resolve/main/include/google/protobuf/compiler/rust/enum.h
- Command line
-
hf download hf://Shenghong/dai_env/include/google/protobuf/compiler/rust/enum.h
-
curl -L -o enum.h https://huggingface.co/Shenghong/dai_env/resolve/main/include/google/protobuf/compiler/rust/enum.h
1.53 kB
| // Protocol Buffers - Google's data interchange format | |
| // Copyright 2023 Google LLC. All rights reserved. | |
| // | |
| // Use of this source code is governed by a BSD-style | |
| // license that can be found in the LICENSE file or at | |
| // https://developers.google.com/open-source/licenses/bsd | |
| namespace google { | |
| namespace protobuf { | |
| namespace compiler { | |
| namespace rust { | |
| // Generates code for a particular enum in `.pb.rs`. | |
| void GenerateEnumDefinition(Context& ctx, const EnumDescriptor& desc); | |
| // An enum value with a unique number and any aliases for it. | |
| struct RustEnumValue { | |
| // The canonical CamelCase name in Rust. | |
| std::string name; | |
| int32_t number; | |
| std::vector<std::string> aliases; | |
| }; | |
| // Returns the list of rust enum variants to produce, along with their aliases. | |
| // Performs name normalization, deduplication, and alias determination. | |
| // The `number` and `name` of every returned `RustEnumValue` is unique. | |
| std::vector<RustEnumValue> EnumValues( | |
| absl::string_view enum_name, | |
| absl::Span<const std::pair<absl::string_view, int32_t>> values); | |
| } // namespace rust | |
| } // namespace compiler | |
| } // namespace protobuf | |
| } // namespace google | |