pub struct ReferenceAdjuster;Expand description
Centralized reference adjustment logic for structural changes
Implementations§
Source§impl ReferenceAdjuster
impl ReferenceAdjuster
pub fn new() -> Self
Sourcepub fn adjust_ast(&self, ast: &ASTNode, op: &ShiftOperation) -> ASTNode
pub fn adjust_ast(&self, ast: &ASTNode, op: &ShiftOperation) -> ASTNode
Adjust an AST for a shift operation. Absolute references track structural shifts.
This compatibility API retains the historical context-free behavior and assumes every cell/range reference binds to the operation’s sheet.
Sourcepub fn adjust_ast_if_changed(
&self,
ast: &ASTNode,
op: &ShiftOperation,
) -> Option<ASTNode>
pub fn adjust_ast_if_changed( &self, ast: &ASTNode, op: &ShiftOperation, ) -> Option<ASTNode>
Return an adjusted AST only when at least one reference changed.
Sourcepub fn adjust_cell_ref(
&self,
cell_ref: &CellRef,
op: &ShiftOperation,
) -> Option<CellRef>
pub fn adjust_cell_ref( &self, cell_ref: &CellRef, op: &ShiftOperation, ) -> Option<CellRef>
Adjust a cell reference for a shift operation. Returns None if the cell is deleted. Absolute references track structural shifts.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ReferenceAdjuster
impl RefUnwindSafe for ReferenceAdjuster
impl Send for ReferenceAdjuster
impl Sync for ReferenceAdjuster
impl Unpin for ReferenceAdjuster
impl UnsafeUnpin for ReferenceAdjuster
impl UnwindSafe for ReferenceAdjuster
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
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