Skip to main content

Module boolean_array_view

Module boolean_array_view 

Source
Expand description

§BooleanArrayView Module - Windowed View over a BooleanArray

BooleanArrayV is a read-only, zero-copy view into a [offset .. offset + len) slice of a BooleanArray.

§Purpose

  • Provides windowed access to bit-packed boolean data without copying buffers.
  • Allows null counts to be cached per view for faster repeated operations.

§Behaviour

  • Enables lightweight sub-ranges for use in downstream computations, filtering, or previews.
  • Creating a view does not allocate; slicing is zero-copy.

§Threading

  • Thread-safe for sharing across threads (uses OnceLock for null count caching).
  • Safe to share via Arc for parallel processing.

§Interop

§Invariants

  • offset + len <= array.len()
  • len is the logical number of boolean elements in the view.

Structs§

BooleanArrayV
BooleanArrayView