Skip to main content

Module parsing

Module parsing 

Source
Expand description

Parsing stage: compiled descriptor → CodeGenMetadata.

This is the first stage of the code-generation pipeline. It walks every message, enum, and service in a FileDescriptorSet and extracts the annotations that drive generation into a structured, runtime-friendly form.

The generator reads the standard Google API extensions (google.api.http, google.api.resource, google.api.field_behavior, google.api.resource_reference), gnostic.openapi.v3.operation, and four trestle field options from proto/olai/trestle/v1/annotations.proto (olai.trestle.v1.response_header, emit_unpopulated, raw_body, request_header). Their field numbers are the *_EXTENSION module constants below. The core debug_redact option (google.protobuf.FieldOptions field 16) is handled in the message submodule. parse_file_descriptor_set is the entry point.

Re-exports§

pub use self::http::HttpPattern;
pub use self::http::UrlSegment;
pub use self::http::extract_http_rule_pattern;
pub use self::http::extract_path_parameters;

Modules§

http
types
Type conversion utilities for code generation

Structs§

CodeGenMetadata
Collected metadata for code generation
EnumInfo
Information about a protobuf enum
EnumValue
Information about an enum value
MessageField
Information about a field in a protobuf message
MessageInfo
Information about a protobuf message
MethodMetadata
Metadata extracted from a service method
OneofVariant
Information about a variant in a oneof field
ServiceInfo
Information about a protobuf service

Functions§

parse_file_descriptor_set
Parse a compiled protobuf FileDescriptorSet into CodeGenMetadata.
process_file_descriptor
Process a single protobuf file descriptor