pub struct RowModel<'a, TData> { /* private fields */ }Implementations§
Source§impl<'a, TData> RowModel<'a, TData>
impl<'a, TData> RowModel<'a, TData>
pub fn root_rows(&self) -> &[usize]
pub fn flat_rows(&self) -> &[usize]
Sourcepub fn parent_rows(&self, row: usize) -> Vec<usize>
pub fn parent_rows(&self, row: usize) -> Vec<usize>
TanStack-aligned: row.getParentRows() (root → … → parent), excluding the row itself.
Sourcepub fn parent_row_ids(&self, row: usize) -> Vec<RowId>
pub fn parent_row_ids(&self, row: usize) -> Vec<RowId>
TanStack-aligned: row.getParentRows().map(r => r.id).
Sourcepub fn leaf_rows(&self, row: usize) -> Vec<usize>
pub fn leaf_rows(&self, row: usize) -> Vec<usize>
TanStack-aligned: row.getLeafRows() is implemented upstream as
flattenBy(row.subRows, r => r.subRows) (DFS preorder), excluding the row itself.
Note: despite the name, this includes all descendants (not only leaf nodes).
Sourcepub fn leaf_row_ids(&self, row: usize) -> Vec<RowId>
pub fn leaf_row_ids(&self, row: usize) -> Vec<RowId>
TanStack-aligned: row.getLeafRows().map(r => r.id).
pub fn row(&self, index: usize) -> Option<&Row<'a, TData>>
pub fn row_by_key(&self, key: RowKey) -> Option<usize>
pub fn row_by_id(&self, id: &str) -> Option<usize>
pub fn rows_by_key(&self) -> &HashMap<RowKey, usize>
pub fn rows_by_id(&self) -> &HashMap<RowId, usize>
pub fn arena(&self) -> &[Row<'a, TData>]
Trait Implementations§
Auto Trait Implementations§
impl<'a, TData> Freeze for RowModel<'a, TData>
impl<'a, TData> RefUnwindSafe for RowModel<'a, TData>where
TData: RefUnwindSafe,
impl<'a, TData> Send for RowModel<'a, TData>where
TData: Sync,
impl<'a, TData> Sync for RowModel<'a, TData>where
TData: Sync,
impl<'a, TData> Unpin for RowModel<'a, TData>
impl<'a, TData> UnsafeUnpin for RowModel<'a, TData>
impl<'a, TData> UnwindSafe for RowModel<'a, TData>where
TData: RefUnwindSafe,
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