|
||||
File indexing completed on 2025-01-31 10:12:00
0001 // Protocol Buffers - Google's data interchange format 0002 // Copyright 2023 Google LLC. All rights reserved. 0003 // 0004 // Use of this source code is governed by a BSD-style 0005 // license that can be found in the LICENSE file or at 0006 // https://developers.google.com/open-source/licenses/bsd 0007 0008 #ifndef GOOGLE_PROTOBUF_COMPILER_RUST_ACCESSORS_HELPERS_H__ 0009 #define GOOGLE_PROTOBUF_COMPILER_RUST_ACCESSORS_HELPERS_H__ 0010 0011 #include <string> 0012 0013 #include "google/protobuf/compiler/rust/context.h" 0014 #include "google/protobuf/descriptor.h" 0015 0016 namespace google { 0017 namespace protobuf { 0018 namespace compiler { 0019 namespace rust { 0020 0021 // Returns the field's default value as a Rust literal / identifier. 0022 // 0023 // Both strings and bytes are represented as a byte string literal, i.e. in the 0024 // format `b"default value here"`. It is the caller's responsibility to convert 0025 // the byte literal to an actual string, if needed. 0026 std::string DefaultValue(Context& ctx, const FieldDescriptor& field); 0027 0028 } // namespace rust 0029 } // namespace compiler 0030 } // namespace protobuf 0031 } // namespace google 0032 0033 #endif // GOOGLE_PROTOBUF_COMPILER_RUST_ACCESSORS_HELPERS_H__
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |