Appearance
cellpack::scans::Decoder
Module contract · All interfaces
At a glance
pub struct Decoder<'c, 'm> { /* private fields */ }Record and chunk decoding: CSR arrays, dense rows and Parts views, plus the workspace sizing those calls need. Bound metadata, tables, ISA dispatch and workspace layout for repeated records.
Construction checks the tables against meta once; every method then decodes with the bound kernel set and the layout of that chunk, so a caller looping over a chunk’s records avoids re-deriving either.
Member index
6 of 6 members
newBinds meta and its tables; fails when they do not belong together.workspace_wordsWorkspace words every method needs ( decode_workspace_words ).partsdecode_parts with this decoder’s binding.parts_pagesdecode_parts_pages with this decoder’s binding.densedecode_record_dense with this decoder’s binding.sparsedecode_record with this decoder’s binding; returns the nnz.
Methods and associated constants
new
pub fn new(meta: &'c Meta<'m>, tables: &'c DecodeTables) -> Result<Self>Binds meta and its tables; fails when they do not belong together.
workspace_words
pub fn workspace_words(&self) -> usizeWorkspace words every method needs (decode_workspace_words).
parts
pub fn parts<'w>(
&self,
record: &'w [u8],
space: IdSpace,
workspace: &'w mut [u64],
) -> Result<Parts<'w>>where
'm: 'w,decode_parts with this decoder’s binding.
parts_pages
pub fn parts_pages<'w>(
&self,
record: PagedRecord<'w>,
space: IdSpace,
workspace: &'w mut [u64],
) -> Result<Parts<'w>>where
'm: 'w,decode_parts_pages with this decoder’s binding.
dense
pub fn dense(
&self,
record: &[u8],
space: IdSpace,
out: &mut [u8],
fill: Fill,
workspace: &mut [u64],
) -> Result<()>decode_record_dense with this decoder’s binding.
sparse
pub fn sparse<I: IndexOut>(
&self,
record: &[u8],
space: IdSpace,
indices: &mut [I],
values: &mut [u8],
workspace: &mut [u64],
) -> Result<usize>decode_record with this decoder’s binding; returns the nnz.
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.