MCPcopy Create free account
hub / github.com/apache/arrow-rs / new

Method new

arrow-buffer/src/builder/offset.rs:31–38  ·  view source on GitHub ↗

Create a new builder with space for `capacity + 1` offsets

(capacity: usize)

Source from the content-addressed store, hash-verified

29impl<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 ///

Callers

nothing calls this directly

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected