pub struct Evaluator<'a> { /* private fields */ }Expand description
Stateful evaluator that tracks recursion depth and circular references.
Implementations§
Source§impl<'a> Evaluator<'a>
impl<'a> Evaluator<'a>
Sourcepub fn new(provider: &'a dyn CellDataProvider) -> Self
pub fn new(provider: &'a dyn CellDataProvider) -> Self
Create a new evaluator backed by the given data provider.
Sourcepub fn eval_arg(&mut self, args: &[Expr], index: usize) -> Result<CellValue>
pub fn eval_arg(&mut self, args: &[Expr], index: usize) -> Result<CellValue>
Evaluate a single argument expression at index, returning an error if
the index is out of bounds.
Sourcepub fn collect_numbers(&mut self, args: &[Expr]) -> Result<Vec<f64>>
pub fn collect_numbers(&mut self, args: &[Expr]) -> Result<Vec<f64>>
Collect all numeric values from the argument list, expanding ranges. Non-numeric values inside ranges are silently skipped (Excel semantics).
Sourcepub fn flatten_args_to_values(
&mut self,
args: &[Expr],
) -> Result<Vec<CellValue>>
pub fn flatten_args_to_values( &mut self, args: &[Expr], ) -> Result<Vec<CellValue>>
Flatten all arguments into a Vec of CellValues, expanding ranges.
Sourcepub fn expand_range(
&mut self,
start: &CellReference,
end: &CellReference,
) -> Result<Vec<CellValue>>
pub fn expand_range( &mut self, start: &CellReference, end: &CellReference, ) -> Result<Vec<CellValue>>
Expand a rectangular cell range into individual CellValues (row-major).
Sourcepub fn current_sheet(&self) -> &str
pub fn current_sheet(&self) -> &str
Return the current sheet name from the provider.
Auto Trait Implementations§
impl<'a> Freeze for Evaluator<'a>
impl<'a> !RefUnwindSafe for Evaluator<'a>
impl<'a> !Send for Evaluator<'a>
impl<'a> !Sync for Evaluator<'a>
impl<'a> Unpin for Evaluator<'a>
impl<'a> !UnwindSafe for Evaluator<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more