Add method signature for repeated fields

This commit is contained in:
2026-05-07 21:21:29 -07:00
parent d9186e697e
commit 7e368feddf
+8
View File
@@ -256,6 +256,14 @@ fn write_message(msg_proto: &DescriptorProto, output: &mut String) {
};
if *f_label == 3 {
output.push_str(&format!(
" pub fn {}(&self) -> {} {{\n",
safe_name, rust_type
));
output.push_str(&format!(
" match (self.{}_start, self.{}_end) {{\n",
field_name, field_name
));
if *is_map {
output.push_str(&format!(" (Some(start), Some(end)) => roto_runtime::MapFieldIterator::new(self.accessor.iter_repeated_range({}, start, end)),\n", tag));
output.push_str(&format!(