I would like to know if this was an intentional design decision, or if google.protobuf.wrapper Well Known Types should be added to prost-types.
Summary
The README of prost-types suggests reviewing the official protocol buffers WKT documentation. However, there are several types listed in this documentation that are absent from prost-types. These include: BoolValue, BytesValue, DoubleValue, FloatValue, Int64Value, Int32Value, UInt32Value, UInt64Value, and StringValue. All of these can be traced back a single protofile definition - Google's wrappers.proto.
The definitions of these messages are not complicated, for example, Int64Value:
message Int64Value {
int64 value = 1;
}
But they are available in Protocol Buffers packages of other languages. For example, in Python you could do:
from google.protobuf import wrappers_pb2
integer_message = wrappers_pb2.Int64Value(value=1)
I wonder, is there a particular reason these simple wrapper classes are missing, and should they be added to prost-types in a future release?
Suggestion
Generate Rust structs from the wrappers.proto definition to match the Protocol Buffers Well Known Types documentation.
I would like to know if this was an intentional design decision, or if
google.protobuf.wrapper
Well Known Types should be added toprost-types
.Summary
The README of
prost-types
suggests reviewing the official protocol buffers WKT documentation. However, there are several types listed in this documentation that are absent fromprost-types
. These include:BoolValue
,BytesValue
,DoubleValue
,FloatValue
,Int64Value
,Int32Value
,UInt32Value
,UInt64Value
, andStringValue
. All of these can be traced back a single protofile definition - Google's wrappers.proto.The definitions of these messages are not complicated, for example,
Int64Value
:But they are available in Protocol Buffers packages of other languages. For example, in Python you could do:
I wonder, is there a particular reason these simple wrapper classes are missing, and should they be added to
prost-types
in a future release?Suggestion
Generate Rust structs from the
wrappers.proto
definition to match the Protocol Buffers Well Known Types documentation.