Skip to main content

DiffView

Struct DiffView 

Source
pub struct DiffView<'a> {
    pub workbook: &'a WorkbookDiff,
}
Expand description

Borrowed view over a WorkbookDiff, providing filtered iteration and deterministic navigation for GUI applications.

Fields§

§workbook: &'a WorkbookDiff

Implementations§

Source§

impl<'a> DiffView<'a>

Source

pub fn new(workbook: &'a WorkbookDiff) -> Self

Source

pub fn sheets(&self) -> impl Iterator<Item = SheetSummaryRow<'a>>

Iterate sheet summary rows in workbook display order.

Source

pub fn rows(&'a self, filter: &ViewFilter) -> Vec<CellChangeRow<'a>>

Collect all visible cell-change rows into a Vec, respecting the filter.

Order is deterministic: sheet order → (row, col).

Source

pub fn row_count(&self, filter: &ViewFilter) -> usize

Total number of visible change rows (may iterate; not O(1)).

Source

pub fn first(&self, filter: &ViewFilter) -> Option<ChangeAnchor>

Return the first change anchor in the view, or None if empty.

Source

pub fn next_after( &self, current: &ChangeAnchor, filter: &ViewFilter, ) -> Option<ChangeAnchor>

Return the anchor immediately after current, or None if at end.

Source

pub fn previous_before( &self, current: &ChangeAnchor, filter: &ViewFilter, ) -> Option<ChangeAnchor>

Return the anchor immediately before current, or None if at start.

Source

pub fn sheet_rows( &'a self, sheet_index: usize, filter: &ViewFilter, ) -> Vec<CellChangeRow<'a>>

All cell-change rows for one sheet (by 0-based sheet index).

Auto Trait Implementations§

§

impl<'a> Freeze for DiffView<'a>

§

impl<'a> RefUnwindSafe for DiffView<'a>

§

impl<'a> Send for DiffView<'a>

§

impl<'a> Sync for DiffView<'a>

§

impl<'a> Unpin for DiffView<'a>

§

impl<'a> UnsafeUnpin for DiffView<'a>

§

impl<'a> UnwindSafe for DiffView<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.