Take some `Datum`s and pack them into a `Row`. This method builds a `Row` by repeatedly increasing the backing allocation. If the contents of the iterator are known ahead of time, consider [`Row::with_capacity`] to right-size the allocation first, and then [`RowPacker::extend`] to populate it with `Datum`s. This avoids the repeated allocation resizing and copying.
(iter: I)
| 192 | /// first, and then [`RowPacker::extend`] to populate it with `Datum`s. |
| 193 | /// This avoids the repeated allocation resizing and copying. |
| 194 | pub fn pack<'a, I, D>(iter: I) -> Row |
| 195 | where |
| 196 | I: IntoIterator<Item = D>, |
| 197 | D: Borrow<Datum<'a>>, |
| 198 | { |
| 199 | let mut row = Row::default(); |
| 200 | row.packer().extend(iter); |
| 201 | row |
| 202 | } |
| 203 | |
| 204 | /// Use `self` to pack `iter`, and then clone the result. |
| 205 | /// |
no test coverage detected