pub enum FieldType {
}
Expand description
Protobuf supported field types
TODO: Groups (even if deprecated)
Variants§
Int32
Protobuf int32
§Remarks
Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead.
Int64
Protobuf int64
§Remarks
Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead.
Uint32
Uint64
Sint32
Protobuf sint32
§Remarks
Uses ZigZag variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s.
Sint64
Protobuf sint64
§Remarks
Uses ZigZag variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s.
Bool
Protobuf bool
Fixed64
Protobuf fixed64
§Remarks
Always eight bytes. More efficient than uint64 if values are often greater than 2^56.
Sfixed64
Double
Protobuf double
String
Bytes
Fixed32
Protobut fixed32
§Remarks
Always four bytes. More efficient than uint32 if values are often greater than 2^28.
Sfixed32
Float
Protobut float
MessageOrEnum(String)
Protobuf message or enum (holds the name)
Map(Box<(FieldType, FieldType)>)
Protobut map
Group(Vec<Field>)
Protobuf group (deprecated)