(&self, ty: &str, fields: I)
| 123 | } |
| 124 | |
| 125 | fn struct_v<I: Iterator<Item = (String, Bytes)>>(&self, ty: &str, fields: I) -> Bytes { |
| 126 | let mut msg = Bytes::new(); |
| 127 | let mut len: usize = 0; |
| 128 | for (n, v) in fields { |
| 129 | msg.identifier(&n); |
| 130 | msg.push_bytes(v); |
| 131 | msg.space(); |
| 132 | len += 1; |
| 133 | } |
| 134 | msg.integer(len); |
| 135 | msg.identifier(&trim_type_name(ty)); |
| 136 | msg.push_str("struct"); |
| 137 | msg |
| 138 | } |
| 139 | |
| 140 | fn enumerate_v(&self, ty: &str, variant: &str) -> Bytes { |
| 141 | let mut msg = Bytes::new(); |
no test coverage detected