Expand description
§Reflection implementation for protobuf data
§Generated vs dynamic
rust-protobuf supports reflection for both:
- generated messages (generated rust code)
- dynamic messages (created from arbitrary
FileDescriptorProto
without code generation)
The API to work with these types of messages is the same.
§API
The API roughly follows Google protobuf C++ and Java API. Some minor adjustements are made to make code more idiomatic to rust.
Structs§
- Enum
Descriptor - Dynamic representation of enum type.
- Enum
Value Descriptor - Description for enum variant.
- Field
Descriptor - Field descriptor.
- File
Descriptor - Reflection for objects defined in
.proto
file (messages, enums, etc). - Message
Descriptor - Dynamic representation of message type.
- Message
Ref - Wrapper around either
MessageFull
reference or a container for an empty dynamic message. - Method
Descriptor - Service method descriptor.
- Oneof
Descriptor - Oneof descriptor.
- Reflect
EqMode - Parameter for
ReflectEq
. - Reflect
MapMut - Dynamic mutable reference to
map
field - Reflect
MapRef - Dynamic reference to
map
field - Reflect
Optional Ref - Singular field field and value type.
- Reflect
Repeated Mut - Dynamic mutable reference to repeated field
- Reflect
Repeated Ref - Dynamic reference to repeated field
- Service
Descriptor - Dynamic representation of service type.
Enums§
- Reflect
Field Ref - Reference to a value stored in a field, optional, repeated or map.
- Reflect
Value Box - Owner value of any elementary type
- Reflect
Value Ref - A reference to a value
- Runtime
Field Type - Reflective representation of field type.
- Runtime
Type - Runtime representation of elementary protobuf type.
- Syntax
.proto
file syntax.
Traits§
- Protobuf
Value - Type implemented by all protobuf singular types (primitives, string, messages, enums).
- Reflect
Eq - Special version of eq.