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§
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>
Sourcefn current_sheet(&self) -> &str
fn current_sheet(&self) -> &str
Current formula sheet name.
fn volatile_level(&self) -> VolatileLevel
fn workbook_seed(&self) -> u64
fn recalc_epoch(&self) -> u64
fn current_cell(&self) -> Option<CellRef>
Sourcefn resolve_range_view(
&self,
_reference: &ReferenceType,
_current_sheet: &str,
) -> Result<RangeView<'ctx>, ExcelError>
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§
Sourcefn rng_for_current(&self, fn_salt: u64) -> SmallRng
fn rng_for_current(&self, fn_salt: u64) -> SmallRng
Deterministic RNG seeded for the current evaluation site and function salt.
Sourcefn date_system(&self) -> DateSystem
fn date_system(&self) -> DateSystem
Workbook date system selection (1900 vs 1904).
Sourcefn get_criteria_mask(
&self,
_view: &RangeView<'_>,
_col_in_view: usize,
_pred: &CriteriaPredicate,
) -> Option<Arc<BooleanArray>>
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.