pub struct Interpreter<'a> {
pub context: &'a dyn EvaluationContext,
/* private fields */
}Fields§
§context: &'a dyn EvaluationContextImplementations§
Source§impl<'a> Interpreter<'a>
impl<'a> Interpreter<'a>
pub fn new(context: &'a dyn EvaluationContext, current_sheet: &'a str) -> Self
pub fn new_with_cell( context: &'a dyn EvaluationContext, current_sheet: &'a str, cell: CellRef, ) -> Self
pub fn current_sheet(&self) -> &'a str
pub fn resolve_range_view<'c>( &'c self, reference: &ReferenceType, current_sheet: &str, ) -> Result<RangeView<'c>, ExcelError>
Sourcepub fn evaluate_ast_as_reference(
&self,
node: &ASTNode,
) -> Result<ReferenceType, ExcelError>
pub fn evaluate_ast_as_reference( &self, node: &ASTNode, ) -> Result<ReferenceType, ExcelError>
Evaluate an AST node in a reference context and return a ReferenceType.
This is used for range combinators (e.g., “:”), by-ref argument flows,
and spill planning. Functions that can return references must set
FnCaps::RETURNS_REFERENCE and override eval_reference.
pub fn evaluate_ast(&self, node: &ASTNode) -> Result<LiteralValue, ExcelError>
pub fn function_context( &self, cell_ref: Option<&CellRef>, ) -> DefaultFunctionContext<'_>
Auto Trait Implementations§
impl<'a> Freeze for Interpreter<'a>
impl<'a> !RefUnwindSafe for Interpreter<'a>
impl<'a> Send for Interpreter<'a>
impl<'a> Sync for Interpreter<'a>
impl<'a> Unpin for Interpreter<'a>
impl<'a> !UnwindSafe for Interpreter<'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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more