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 standard Google API extensions only — there are no custom Trestle proto extensions. The recognized extensions and their field numbers are the *_EXTENSION module constants below (google.api.http, google.api.resource, google.api.field_behavior, google.api.resource_reference, and gnostic.openapi.v3.operation), plus the core debug_redact option (google.protobuf.FieldOptions field 16, 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