英文:
Extend keyword in protobuf
问题
"extend" 在 protobuf 中的作用是什么?
举例来说,在一个 .proto 文件中,我有以下内容:
extend ReportConfig {
optional PerfStandardReportConfig perf_standard_report = 201;
optional PerfCategoryReportConfig perf_category_report = 202;
}
英文:
What does extend do in protobuf?
For example, in a .proto file I have something like
extend ReportConfig {
optional PerfStandardReportConfig perf_standard_report = 201;
optional PerfCategoryReportConfig perf_category_report = 202;
}
答案1
得分: 1
The extend
keyword in Protobuf
is used to define extensions to a message type. Extensions are a way to add new fields to a message type without having to change the original message type definition.
P.S: extend
is a discouraged feature from Protobuf
version 3.
英文:
The extend
keyword in Protobuf
is used to define extensions to a message type. Extensions are a way to add new fields to a message type without having to change the original message type definition.
P.S: extend
is a discouraged feature from Protobuf
version 3
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论