pub struct TestWorkbook { /* private fields */ }Implementations§
Source§impl TestWorkbook
impl TestWorkbook
pub fn new() -> Self
pub fn with_cell<S: Into<String>>( self, sheet: S, row: u32, col: u32, v: LiteralValue, ) -> Self
pub fn with_cell_a1<S: Into<String>, A: AsRef<str>>( self, sheet: S, a1: A, v: LiteralValue, ) -> Self
pub fn with_range<S: Into<String>>( self, sheet: S, row: u32, col: u32, data: Vec<Vec<LiteralValue>>, ) -> Self
pub fn with_named_range<S: Into<String>>( self, name: S, data: Vec<Vec<LiteralValue>>, ) -> Self
pub fn with_table<T: Table + 'static, S: Into<String>>( self, name: S, table: T, ) -> Self
Sourcepub fn with_simple_table<S: Into<String>>(
self,
name: S,
headers: Vec<String>,
data: Vec<Vec<LiteralValue>>,
totals: Option<Vec<LiteralValue>>,
) -> Self
pub fn with_simple_table<S: Into<String>>( self, name: S, headers: Vec<String>, data: Vec<Vec<LiteralValue>>, totals: Option<Vec<LiteralValue>>, ) -> Self
Create a simple in-memory table with headers, optional totals, and data. headers: column names in order; data: Vec of rows; totals: optional row of totals matching width
pub fn with_function(self, func: Arc<dyn Function>) -> Self
Sourcepub fn with_alias<S: AsRef<str>>(
self,
ns: S,
alias: S,
target_ns: S,
target_name: S,
) -> Self
pub fn with_alias<S: AsRef<str>>( self, ns: S, alias: S, target_ns: S, target_name: S, ) -> Self
Register an alias for a function in this workbook (test helper)
pub fn interpreter(&self) -> Interpreter<'_>
Trait Implementations§
Source§impl Default for TestWorkbook
impl Default for TestWorkbook
Source§fn default() -> TestWorkbook
fn default() -> TestWorkbook
Returns the “default value” for a type. Read more
Source§impl EvaluationContext for TestWorkbook
impl EvaluationContext for TestWorkbook
Source§fn cancellation_token(&self) -> Option<Arc<AtomicBool>>
fn cancellation_token(&self) -> Option<Arc<AtomicBool>>
Optional cancellation token. When Some, long-running operations should periodically abort.
Source§fn resolve_range_view<'c>(
&'c self,
reference: &ReferenceType,
current_sheet: &str,
) -> Result<RangeView<'c>, ExcelError>
fn resolve_range_view<'c>( &'c self, reference: &ReferenceType, current_sheet: &str, ) -> Result<RangeView<'c>, ExcelError>
Resolve a reference into a
RangeView with clear bounds.
Implementations should resolve un/partially bounded references using used-region.Source§fn used_rows_for_columns(
&self,
sheet: &str,
start_col: u32,
end_col: u32,
) -> Option<(u32, u32)>
fn used_rows_for_columns( &self, sheet: &str, start_col: u32, end_col: u32, ) -> Option<(u32, u32)>
Optional: Return the min/max used rows for a set of columns on a sheet.
When None, the backend does not provide used-region hints.
Source§fn used_cols_for_rows(
&self,
sheet: &str,
start_row: u32,
end_row: u32,
) -> Option<(u32, u32)>
fn used_cols_for_rows( &self, sheet: &str, start_row: u32, end_row: u32, ) -> Option<(u32, u32)>
Optional: Return the min/max used columns for a set of rows on a sheet.
When None, the backend does not provide used-region hints.
Source§fn sheet_bounds(&self, _sheet: &str) -> Option<(u32, u32)>
fn sheet_bounds(&self, _sheet: &str) -> Option<(u32, u32)>
Optional: Physical sheet bounds (max rows, max cols) if known.
Source§fn backend_caps(&self) -> BackendCaps
fn backend_caps(&self) -> BackendCaps
Backend capability advertisement for IO/adapters.
Source§fn thread_pool(&self) -> Option<&Arc<ThreadPool>>
fn thread_pool(&self) -> Option<&Arc<ThreadPool>>
Get access to the shared thread pool for parallel evaluation
Returns None if parallel evaluation is disabled or unavailable
Source§fn chunk_hint(&self) -> Option<usize>
fn chunk_hint(&self) -> Option<usize>
Optional chunk size hint for streaming visitors.
Source§fn clock(&self) -> &dyn ClockProvider
fn clock(&self) -> &dyn ClockProvider
Clock provider for volatile date/time builtins. Read more
Source§fn timezone(&self) -> &TimeZoneSpec
fn timezone(&self) -> &TimeZoneSpec
Timezone spec for date/time functions. Read more
Source§fn volatile_level(&self) -> VolatileLevel
fn volatile_level(&self) -> VolatileLevel
Volatile granularity. Default Always for backwards compatibility.
Source§fn workbook_seed(&self) -> u64
fn workbook_seed(&self) -> u64
A stable workbook seed for RNG composition.
Source§fn recalc_epoch(&self) -> u64
fn recalc_epoch(&self) -> u64
Recalc epoch that increments on each full recalc when appropriate.
Source§fn data_snapshot_id(&self) -> u64
fn data_snapshot_id(&self) -> u64
Monotonic identifier for the current data snapshot; increments on mutation.
Source§fn date_system(&self) -> DateSystem
fn date_system(&self) -> DateSystem
Workbook date system selection (1900 vs 1904).
Defaults to 1900 for compatibility.
Source§fn build_criteria_mask(
&self,
_view: &RangeView<'_>,
_col_in_view: usize,
_pred: &CriteriaPredicate,
) -> Option<Arc<BooleanArray>>
fn build_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.
Implementations should return None if not supported.
Source§impl FunctionProvider for TestWorkbook
impl FunctionProvider for TestWorkbook
Source§impl NamedRangeResolver for TestWorkbook
impl NamedRangeResolver for TestWorkbook
fn resolve_named_range_reference( &self, name: &str, ) -> Result<Vec<Vec<LiteralValue>>, ExcelError>
Source§impl RangeResolver for TestWorkbook
impl RangeResolver for TestWorkbook
Source§impl ReferenceResolver for TestWorkbook
impl ReferenceResolver for TestWorkbook
fn resolve_cell_reference( &self, sheet: Option<&str>, row: u32, col: u32, ) -> Result<LiteralValue, ExcelError>
Source§impl Resolver for TestWorkbook
impl Resolver for TestWorkbook
fn resolve_range_like( &self, r: &ReferenceType, ) -> Result<Box<dyn Range>, ExcelError>
Source§impl SourceResolver for TestWorkbook
impl SourceResolver for TestWorkbook
fn source_scalar_version(&self, _name: &str) -> Option<u64>
fn resolve_source_scalar(&self, name: &str) -> Result<LiteralValue, ExcelError>
fn source_table_version(&self, _name: &str) -> Option<u64>
fn resolve_source_table(&self, name: &str) -> Result<Box<dyn Table>, ExcelError>
Source§impl TableResolver for TestWorkbook
impl TableResolver for TestWorkbook
fn resolve_table_reference( &self, tref: &TableReference, ) -> Result<Box<dyn Table>, ExcelError>
Auto Trait Implementations§
impl Freeze for TestWorkbook
impl !RefUnwindSafe for TestWorkbook
impl Send for TestWorkbook
impl Sync for TestWorkbook
impl Unpin for TestWorkbook
impl UnsafeUnpin for TestWorkbook
impl !UnwindSafe for TestWorkbook
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