pub struct Evaluator<'h> {
pub host: &'h mut dyn Host,
pub sheet: usize,
pub at: CellRef,
/* private fields */
}Fields§
§host: &'h mut dyn Host§sheet: usize§at: CellRefImplementations§
Source§impl<'h> Evaluator<'h>
impl<'h> Evaluator<'h>
pub fn new(host: &'h mut dyn Host, sheet: usize, at: CellRef) -> Self
Sourcepub fn value(&mut self, e: &Expr) -> Value
pub fn value(&mut self, e: &Expr) -> Value
Evaluates to a value (references are dereferenced; multi-cell → array).
pub fn reference_areas(&self, r: &Reference) -> Result<Vec<Area>, CellError>
Sourcepub fn deref(&mut self, ev: Ev) -> Value
pub fn deref(&mut self, ev: Ev) -> Value
Dereferences: one cell → its value; a block → an array; several areas → #VALUE!.
A block keeps its full shape (blanks included) when it holds at most FULL_SIZE_CELLS
cells, or when it holds at most FULL_SIZE_BOUNDED_CELLS cells (one full column’s worth)
and does not run to the sheet’s last row or column. Every other block (larger, or a
bigger one that runs to the sheet’s edge, such as A:A or 1:1) is trimmed to the
sheet’s used range before its values are read. An array over MAX_CELLS is #NUM!.
pub fn area_value(&mut self, a: &Area) -> Value
Sourcepub fn trim(&mut self, a: &Area) -> RangeRef
pub fn trim(&mut self, a: &Area) -> RangeRef
Trims the bottom/right of an area to the sheet’s used range (keeps the top-left so positions stay right).
pub fn eval(&mut self, e: &Expr) -> Ev
Auto Trait Implementations§
impl<'h> !RefUnwindSafe for Evaluator<'h>
impl<'h> !Send for Evaluator<'h>
impl<'h> !Sync for Evaluator<'h>
impl<'h> !UnwindSafe for Evaluator<'h>
impl<'h> Freeze for Evaluator<'h>
impl<'h> Unpin for Evaluator<'h>
impl<'h> UnsafeUnpin for Evaluator<'h>
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