Skip to main content

Crate buffa_descriptor

Crate buffa_descriptor 

Source
Expand description

Protobuf descriptor types for buffa.

This crate provides buffa-generated Rust types for the protobuf descriptor schema (google/protobuf/descriptor.proto) and the protoc plugin protocol (google/protobuf/compiler/plugin.proto). It is the foundation for both compile-time code generation (buffa-codegen) and runtime reflection.

The types are self-hosted — generated by buffa-codegen itself — so there is no dependency on an external protobuf library. The only runtime dependency is buffa.

§Modules

  • generated::descriptorFileDescriptorProto, DescriptorProto, FieldDescriptorProto, FeatureSet, Edition, and the rest of descriptor.proto.
  • generated::compilerCodeGeneratorRequest, CodeGeneratorResponse from plugin.proto.

§Regenerating

The generated code is checked in. To regenerate (after a codegen output change or a protobuf version bump):

task gen-bootstrap-types

Modules§

features
Edition feature resolution.
generated
Generated protobuf descriptor types.

Structs§

EnumDescriptor
A linked enum descriptor.
EnumIndex
Index of an EnumDescriptor within its owning pool.
EnumValueDescriptor
A single value within an enum.
ExtensionDescriptor
A linked extension descriptor.
ExtensionIndex
Pool-local index of a registered extension.
FieldDescriptor
A linked, feature-resolved field descriptor.
MessageDescriptor
A linked message descriptor.
MessageIndex
Index of a MessageDescriptor within its owning pool.
MethodDescriptor
A linked RPC method descriptor.
OneofDescriptor
A oneof declaration within a message.
ServiceDescriptor
A linked service descriptor.
ServiceIndex
Pool-local index of a registered service.

Enums§

FieldKind
The kind of a protobuf field, flattening type × cardinality × map-entry.
ScalarType
Protobuf scalar field types.
SingularKind
The element kind of a singular field, list element, or map value.