pub struct RangeView<'a> { /* private fields */ }Expand description
Unified view over a 2D range with efficient traversal utilities.
Implementations§
Source§impl<'a> RangeView<'a>
impl<'a> RangeView<'a>
pub fn from_borrowed(rows: &'a [Vec<LiteralValue>]) -> Self
pub fn from_arrow(av: ArrowRangeView<'a>) -> Self
pub fn from_graph( graph: &'a DependencyGraph, sheet_id: EngineSheetId, sr: u32, sc: u32, er: u32, ec: u32, ) -> Self
pub fn dims(&self) -> (usize, usize)
pub fn is_empty(&self) -> bool
pub fn kind_probe(&self) -> RangeKind
pub fn as_1x1(&self) -> Option<LiteralValue>
Sourcepub fn get_cell(&self, row: usize, col: usize) -> LiteralValue
pub fn get_cell(&self, row: usize, col: usize) -> LiteralValue
Get a specific cell by row and column index (0-based). Returns Empty for out-of-bounds access.
Sourcepub fn for_each_cell(
&self,
f: &mut dyn FnMut(&LiteralValue) -> Result<(), ExcelError>,
) -> Result<(), ExcelError>
pub fn for_each_cell( &self, f: &mut dyn FnMut(&LiteralValue) -> Result<(), ExcelError>, ) -> Result<(), ExcelError>
Row-major cell traversal. For borrowable backings, passes borrowed slices/values.
Sourcepub fn for_each_row(
&self,
f: &mut dyn FnMut(&[LiteralValue]) -> Result<(), ExcelError>,
) -> Result<(), ExcelError>
pub fn for_each_row( &self, f: &mut dyn FnMut(&[LiteralValue]) -> Result<(), ExcelError>, ) -> Result<(), ExcelError>
Visit each row as a borrowed slice when possible; otherwise uses a reusable buffer per row.
Sourcepub fn for_each_col(
&self,
f: &mut dyn FnMut(&[LiteralValue]) -> Result<(), ExcelError>,
) -> Result<(), ExcelError>
pub fn for_each_col( &self, f: &mut dyn FnMut(&[LiteralValue]) -> Result<(), ExcelError>, ) -> Result<(), ExcelError>
Visit each column as a contiguous slice (buffered when needed)
Sourcepub fn as_arrow(&self) -> Option<&ArrowRangeView<'a>>
pub fn as_arrow(&self) -> Option<&ArrowRangeView<'a>>
If Arrow-backed, return the underlying ArrowRangeView for vectorized fast paths.
Sourcepub fn get_cell_numeric(
&self,
row: usize,
col: usize,
policy: CoercionPolicy,
) -> Option<f64>
pub fn get_cell_numeric( &self, row: usize, col: usize, policy: CoercionPolicy, ) -> Option<f64>
Get a numeric value at a specific cell, with coercion. Returns None for empty cells or non-coercible values.
Sourcepub fn numbers_chunked(
&self,
policy: CoercionPolicy,
min_chunk: usize,
f: &mut dyn FnMut(NumericChunk<'_>) -> Result<(), ExcelError>,
) -> Result<(), ExcelError>
pub fn numbers_chunked( &self, policy: CoercionPolicy, min_chunk: usize, f: &mut dyn FnMut(NumericChunk<'_>) -> Result<(), ExcelError>, ) -> Result<(), ExcelError>
Numeric chunk iteration with coercion policy
Source§impl<'a> RangeView<'a>
impl<'a> RangeView<'a>
pub fn from_hybrid( graph: &'a DependencyGraph, sheet_id: EngineSheetId, sr: u32, sc: u32, arrow: ArrowRangeView<'a>, ) -> Self
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for RangeView<'a>
impl<'a> !RefUnwindSafe for RangeView<'a>
impl<'a> Send for RangeView<'a>
impl<'a> Sync for RangeView<'a>
impl<'a> Unpin for RangeView<'a>
impl<'a> !UnwindSafe for RangeView<'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