Skip to main content

parse_struct_prost_fields

Function parse_struct_prost_fields 

Source
pub fn parse_struct_prost_fields(
    source: &str,
    struct_name: &str,
) -> Result<Vec<ProtoField>, String>
Expand description

Extract #[prost(..)] field declarations from one struct in Rust source text, by scanning forward from each #[prost(..)] occurrence within the struct’s brace-matched body to the field name it decorates. Deliberately not a full Rust parser (no syn) — same tradeoff as parse_proto_message.