pub trait FnMapCtx {
// Required methods
fn is_array_context(&self) -> bool;
fn map_unary_numeric(
&mut self,
f: &mut dyn FnMut(f64) -> Result<LiteralValue, ExcelError>,
) -> Result<(), ExcelError>;
fn map_binary_numeric(
&mut self,
f: &mut dyn FnMut(f64, f64) -> Result<LiteralValue, ExcelError>,
) -> Result<(), ExcelError>;
fn finalize(&mut self) -> LiteralValue;
}Expand description
Context for eval_map (Element-wise operations).
Required Methods§
Sourcefn is_array_context(&self) -> bool
fn is_array_context(&self) -> bool
Whether inputs indicate an array/range context. If false, callers should fall back to scalar.
Sourcefn map_unary_numeric(
&mut self,
f: &mut dyn FnMut(f64) -> Result<LiteralValue, ExcelError>,
) -> Result<(), ExcelError>
fn map_unary_numeric( &mut self, f: &mut dyn FnMut(f64) -> Result<LiteralValue, ExcelError>, ) -> Result<(), ExcelError>
Apply a unary numeric mapping over the broadcasted input. The closure should return the mapped cell.
Sourcefn map_binary_numeric(
&mut self,
f: &mut dyn FnMut(f64, f64) -> Result<LiteralValue, ExcelError>,
) -> Result<(), ExcelError>
fn map_binary_numeric( &mut self, f: &mut dyn FnMut(f64, f64) -> Result<LiteralValue, ExcelError>, ) -> Result<(), ExcelError>
Apply a binary numeric mapping over the broadcasted inputs (first two args).
Sourcefn finalize(&mut self) -> LiteralValue
fn finalize(&mut self) -> LiteralValue
Finalize and retrieve the output value (typically an Array). Implementations may move out internal buffers.