Create a new builder with space for `capacity + 1` offsets
(capacity: usize)
| 29 | impl<O: ArrowNativeType> OffsetBufferBuilder<O> { |
| 30 | /// Create a new builder with space for `capacity + 1` offsets |
| 31 | pub fn new(capacity: usize) -> Self { |
| 32 | let mut offsets = Vec::with_capacity(capacity + 1); |
| 33 | offsets.push(O::usize_as(0)); |
| 34 | Self { |
| 35 | offsets, |
| 36 | last_offset: 0, |
| 37 | } |
| 38 | } |
| 39 | |
| 40 | /// Push a slice of `length` bytes |
| 41 | /// |