Skip to main content

FunctionContext

Trait FunctionContext 

Source
pub trait FunctionContext<'ctx> {
Show 15 methods // Required methods fn locale(&self) -> Locale; fn timezone(&self) -> &TimeZoneSpec; fn clock(&self) -> &dyn ClockProvider; fn thread_pool(&self) -> Option<&Arc<ThreadPool>>; fn cancellation_token(&self) -> Option<Arc<AtomicBool>>; fn chunk_hint(&self) -> Option<usize>; fn current_sheet(&self) -> &str; fn volatile_level(&self) -> VolatileLevel; fn workbook_seed(&self) -> u64; fn recalc_epoch(&self) -> u64; fn current_cell(&self) -> Option<CellRef>; fn resolve_range_view( &self, _reference: &ReferenceType, _current_sheet: &str, ) -> Result<RangeView<'ctx>, ExcelError>; // Provided methods fn rng_for_current(&self, fn_salt: u64) -> SmallRng { ... } fn date_system(&self) -> DateSystem { ... } fn get_criteria_mask( &self, _view: &RangeView<'_>, _col_in_view: usize, _pred: &CriteriaPredicate, ) -> Option<Arc<BooleanArray>> { ... }
}
Expand description

Minimal context exposed to functions (no engine/graph APIs)

Required Methods§

Source

fn locale(&self) -> Locale

Source

fn timezone(&self) -> &TimeZoneSpec

Source

fn clock(&self) -> &dyn ClockProvider

Source

fn thread_pool(&self) -> Option<&Arc<ThreadPool>>

Source

fn cancellation_token(&self) -> Option<Arc<AtomicBool>>

Source

fn chunk_hint(&self) -> Option<usize>

Source

fn current_sheet(&self) -> &str

Current formula sheet name.

Source

fn volatile_level(&self) -> VolatileLevel

Source

fn workbook_seed(&self) -> u64

Source

fn recalc_epoch(&self) -> u64

Source

fn current_cell(&self) -> Option<CellRef>

Source

fn resolve_range_view( &self, _reference: &ReferenceType, _current_sheet: &str, ) -> Result<RangeView<'ctx>, ExcelError>

Resolve a reference into a RangeView using the underlying engine context.

Provided Methods§

Source

fn rng_for_current(&self, fn_salt: u64) -> SmallRng

Deterministic RNG seeded for the current evaluation site and function salt.

Source

fn date_system(&self) -> DateSystem

Workbook date system selection (1900 vs 1904).

Source

fn get_criteria_mask( &self, _view: &RangeView<'_>, _col_in_view: usize, _pred: &CriteriaPredicate, ) -> Option<Arc<BooleanArray>>

Optional: Build or fetch a cached boolean mask for a criterion over an Arrow-backed view. Returns None if not supported by the underlying context.

Implementors§