Add method signature for repeated fields
This commit is contained in:
@@ -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!(
|
||||
|
||||
Reference in New Issue
Block a user