Appearance
cellpack::loader::ProcessFn
Module contract · All interfaces
At a glance
pub struct ProcessFn { /* private fields */ }A schema’s callbacks: both for RowFormat::Auto, one for a forced format.
Member index
6 of 6 members
newBinds a pair of callbacks ( RowFormat::Auto ). Both must compute the same output from the same row; which one runs depends on how the record is stored and how much of the output it covers.with_formatBinds the callbacks a row format needs: both for Auto , csr for Csr , dense for Dense ; an unneeded one may be absent and is never called.with_partial_rowsLets csr receive partial rows (see CsrRow ); ignored when only dense rows are delivered.partial_rowsWhether the CSR callback takes partial rows.row_formatThe format the schema delivers, which the planner prices rows with.addressesEntry addresses of the CSR and dense callbacks (0 when absent).
Methods and associated constants
new
pub unsafe fn new(
csr: CsrFn,
dense: DenseFn,
user_data: *const c_void,
owner: Arc<dyn Send + Sync>,
) -> SelfBinds a pair of callbacks (RowFormat::Auto). Both must compute the same output from the same row; which one runs depends on how the record is stored and how much of the output it covers.
Safety
Callbacks and context stay valid through owner, tolerate concurrent calls, never unwind across the ABI, write only their cell’s output and their scratch, and retain no pointer after returning.
with_format
pub unsafe fn with_format(
format: RowFormat,
csr: Option<CsrFn>,
dense: Option<DenseFn>,
user_data: *const c_void,
owner: Arc<dyn Send + Sync>,
) -> Result<Self>Binds the callbacks a row format needs: both for Auto, csr for Csr, dense for Dense; an unneeded one may be absent and is never called.
Safety
As for Self::new.
with_partial_rows
pub unsafe fn with_partial_rows(self) -> SelfLets csr receive partial rows (see CsrRow); ignored when only dense rows are delivered.
Safety
The CSR callback handles null columns and values by calling resolve, and calls it only during its own invocation.
partial_rows
pub fn partial_rows(&self) -> boolWhether the CSR callback takes partial rows.
row_format
pub fn row_format(&self) -> RowFormatThe format the schema delivers, which the planner prices rows with.
addresses
Entry addresses of the CSR and dense callbacks (0 when absent).
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.