Skip to content
API REFERENCEUsage guides →

cellpack::loader::Batch ​

struct

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) -> u64

The run generation the lease was taken under.

index ​

pub fn index(&self) -> u64

The batch number.

first_position ​

pub fn first_position(&self) -> u64

The first position in the slot.

rows ​

pub fn rows(&self) -> usize

Positions in the slot.

data ​

pub fn data(&self) -> &[u8] ⓘ

The whole slot: every schema’s region plus padding, cut to the data actually mapped.

region ​

pub fn region(&self, s: usize) -> &[u8] ⓘ

Schema s’s outputs: rows × cell_bytes(s) compact bytes.

schemas ​

pub fn schemas(&self) -> usize

Schemas in the slot, one region each.

cell_bytes ​

pub fn cell_bytes(&self, s: usize) -> usize

Bytes of one cell’s output for schema s.

region_offset ​

pub fn region_offset(&self, s: usize) -> usize

Offset 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 ​

impl Drop for Batch<'_>

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