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

Method slice

arrow-array/src/array/byte_view_array.rs:462–470  ·  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

460
461 /// Returns a zero-copy slice of this array with the indicated offset and length.
462 pub fn slice(&self, offset: usize, length: usize) -> Self {
463 Self {
464 data_type: T::DATA_TYPE,
465 views: self.views.slice(offset, length),
466 buffers: self.buffers.clone(),
467 nulls: self.nulls.as_ref().map(|n| n.slice(offset, length)),
468 phantom: Default::default(),
469 }
470 }
471
472 /// Returns a "compacted" version of this array
473 ///

Calls 3

defaultFunction · 0.85
cloneMethod · 0.45
as_refMethod · 0.45