Skip to content
API REFERENCEUsage guides →

cellpack::scans::map_parts ​

fn

Module contract · All interfaces

At a glance ​

pub fn map_parts<S: CastInto<T>, T: Element>(
    parts: &Parts<'_>,
    map: &[u32],
    dict: &[T],
    modes: &[T],
    cols: &mut [u32],
    vals: &mut [T],
) -> Result<usize>

Mapping decoded rows onto a caller column panel, and the element types its conversions take. Maps a decoded row: for each element, col = map[id]; elements whose column is UNMAPPED are dropped, the rest are written in order to cols and vals. Values are dict[rank] for a dictionary (dict holds its entries converted by Dict::cast_into) or the raw values read as S and converted. For mode-coded values, modes holds the chunk’s column modes converted to T (see cast_values), indexed by coded id; it may be empty for chunks without column modes. cols and vals need room for every element of the row; map must cover the row’s largest id. Returns the number of elements kept. Columns keep the row’s id order, so they are ascending only if the map is monotonic.

Contract reference ​

See the module reference for semantic input/output rules, units, allocation, mutation, failure behavior, and lifetime requirements. Declarations and documented members are synchronized from the crate source.

Definition