polars_arrow::legacy::conversion

Function primitive_to_vec

Source
pub fn primitive_to_vec<T: NativeType>(arr: ArrayRef) -> Option<Vec<T>>
Expand description

Returns its underlying Vec, if possible.

This operation returns Some iff this PrimitiveArray:

  • has not been sliced with an offset
  • has not been cloned (i.e. Arc::get_mut yields Some)
  • has not been imported from the c data interface (FFI)