pub fn extract_protobuf(
source_path: &str,
input: &str,
) -> Result<ProtoFile, ProtobufExtractionError>Expand description
Extracts an owned protobuf contract from a .proto source.
Output collections are sorted and deduplicated. The result contains contract metadata and line coordinates, but never retains the input source or source snippets.
ยงErrors
Returns ProtobufExtractionError when parsing fails, declarations conflict, field numbers
are invalid, or a message repeats a field name or number.