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

Method slice

arrow-array/src/array/byte_array.rs:362–369  ·  view source on GitHub ↗

Returns a zero-copy slice of this array with the indicated offset and length.

(&self, offset: usize, length: usize)

Source from the content-addressed store, hash-verified

360
361 /// Returns a zero-copy slice of this array with the indicated offset and length.
362 pub fn slice(&self, offset: usize, length: usize) -> Self {
363 Self {
364 data_type: T::DATA_TYPE,
365 value_offsets: self.value_offsets.slice(offset, length),
366 value_data: self.value_data.clone(),
367 nulls: self.nulls.as_ref().map(|n| n.slice(offset, length)),
368 }
369 }
370
371 /// Returns `GenericByteBuilder` of this byte array for mutating its values if the underlying
372 /// offset and data buffers are not shared by others.

Callers

nothing calls this directly

Calls 2

cloneMethod · 0.45
as_refMethod · 0.45

Tested by

no test coverage detected