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, preserving source tokens
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
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 UnwindSafe for ReferenceAdjuster
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