Appearance
cellpack::loader::Batch
Module contract · All interfaces
At a glance
pub struct Batch<'a> { /* private fields */ }Borrowed slot lease. Output references cannot outlive this guard.
Member index
10 of 10 members
generationThe run generation the lease was taken under.indexThe batch number.first_positionThe first position in the slot.rowsPositions in the slot.dataThe whole slot: every schema’s region plus padding, cut to the data actually mapped.regionSchema s ’s outputs: rows × cell_bytes(s) compact bytes.schemasSchemas in the slot, one region each.cell_bytesBytes of one cell’s output for schema s .region_offsetOffset of schema s ’s region within the slot (for consumers that compute their own addresses).releaseReturns the slot now instead of at the end of the guard’s scope.
Methods and associated constants
generation
pub fn generation(&self) -> u64The run generation the lease was taken under.
index
The batch number.
first_position
pub fn first_position(&self) -> u64The first position in the slot.
rows
Positions in the slot.
data
The whole slot: every schema’s region plus padding, cut to the data actually mapped.
region
Schema s’s outputs: rows × cell_bytes(s) compact bytes.
schemas
Schemas in the slot, one region each.
cell_bytes
pub fn cell_bytes(&self, s: usize) -> usizeBytes of one cell’s output for schema s.
region_offset
pub fn region_offset(&self, s: usize) -> usizeOffset of schema s’s region within the slot (for consumers that compute their own addresses).
release
pub fn release(self)Returns the slot now instead of at the end of the guard’s scope.
Implemented traits
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.