Skip to content
API REFERENCEUsage guides →

cellpack::scans::DecodeTables ​

struct

Module contract · All interfaces

At a glance ​

pub struct DecodeTables { /* private fields */ }

The per-chunk lookup tables, bound to the runtime or to a given one. Decode-side lookup tables of one chunk.

Built from a Meta once per chunk and borrowed by every record decode. model_key, n_genes and renumbered identify the metadata the tables came from, so a caller rebinding them to another chunk is rejected in constant time (see DecodeTables::check).

Member index ​

5 of 5 members

  • allocated_bytesHeap payload retained by the derived tables, excluding allocator overhead.
  • checkRejects tables derived from other metadata (another chunk, or the same chunk re-parsed with different models).
  • prefetchAsks the processor to start loading the slot tables a record decode reads, so a caller can overlap the loads with other work.
  • source_of_codedSource gene of each coded id, or None without renumbering (coded ids are source ids). Callers decoding in IdSpace::Coded compose their own gene mapping with this.
  • coded_of_sourceCoded id of each source gene, or None without renumbering.

Methods and associated constants ​

allocated_bytes ​

pub fn allocated_bytes(&self) -> usize

Heap payload retained by the derived tables, excluding allocator overhead.

check ​

pub fn check(&self, meta: &Meta<'_>) -> Result<()>

Rejects tables derived from other metadata (another chunk, or the same chunk re-parsed with different models).

prefetch ​

pub fn prefetch(&self)

Asks the processor to start loading the slot tables a record decode reads, so a caller can overlap the loads with other work.

source_of_coded ​

pub fn source_of_coded(&self) -> Option<&[u32]>

Source gene of each coded id, or None without renumbering (coded ids are source ids). Callers decoding in IdSpace::Coded compose their own gene mapping with this.

coded_of_source ​

pub fn coded_of_source(&self) -> Option<&[u32]>

Coded id of each source gene, or None without renumbering.

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