pub struct RowWindow { /* private fields */ }Expand description
One window of a RowSource, with its first rows and its count; see
the module docs.
Implementations§
Source§impl RowWindow
impl RowWindow
Sourcepub fn reader() -> WindowReader
pub fn reader() -> WindowReader
How to read: offset, length, sample and counting.
Sourcepub fn read(
source: impl RowSource,
offset: usize,
len: usize,
) -> Result<Self, DataError>
pub fn read( source: impl RowSource, offset: usize, len: usize, ) -> Result<Self, DataError>
The rows offset..offset + len of source, counting the rest.
Sourcepub fn total(&self) -> Option<usize>
pub fn total(&self) -> Option<usize>
How many rows the source had, when it was read to the end.
Sourcepub fn to_virtual_table(&self) -> VirtualTable<&RowWindow>
pub fn to_virtual_table(&self) -> VirtualTable<&RowWindow>
The window as a virtualised table: typed alignment from the schema (or the sampled cells), positioned on the window.
Trait Implementations§
Source§impl VirtualRows for RowWindow
impl VirtualRows for RowWindow
Source§fn row(&self, index: usize) -> Option<Vec<Value>>
fn row(&self, index: usize) -> Option<Vec<Value>>
The row at
index (0-based), or None past the end.Source§fn rows_columns(
&self,
start: usize,
len: usize,
columns: &[usize],
) -> Vec<Vec<Value>>
fn rows_columns( &self, start: usize, len: usize, columns: &[usize], ) -> Vec<Vec<Value>>
Up to
len rows from start, each with only the cells of
columns (0-based, in that order; a cell past the row’s end is
null): what a column window of a
wide table fetches. The default calls rows
and picks the cells; a source that can read some columns without
the rest (a columnar file, a query, cells computed on demand such
as FnCells) overrides it.Auto Trait Implementations§
impl Freeze for RowWindow
impl RefUnwindSafe for RowWindow
impl Send for RowWindow
impl Sync for RowWindow
impl Unpin for RowWindow
impl UnsafeUnpin for RowWindow
impl UnwindSafe for RowWindow
Blanket Implementations§
impl<T> Allocation for T
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