pub struct Replacement {
pub old: String,
pub new: String,
pub replace_all: bool,
pub anchor: Option<LineSpan>,
}Expand description
One replacement, as an editor’s edit tool describes it.
Fields§
§old: String§new: String§replace_all: boolWhen false, the target must occur EXACTLY once or the edit is refused.
Ignored when anchor is set: an anchored edit is positional, so
“everywhere” has no meaning for it.
anchor: Option<LineSpan>F48 Phase B, auggie arm — where the family says the target is. When
present the search is CONFINED to these lines, which is what makes a
repeated target unambiguous: body may occur all over the file and
still occur exactly once inside its own anchor.
None for families that locate by string search alone (Claude’s
Edit/MultiEdit), where a repeated target genuinely is ambiguous.
Trait Implementations§
Source§impl Clone for Replacement
impl Clone for Replacement
Source§fn clone(&self) -> Replacement
fn clone(&self) -> Replacement
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for Replacement
impl RefUnwindSafe for Replacement
impl Send for Replacement
impl Sync for Replacement
impl Unpin for Replacement
impl UnsafeUnpin for Replacement
impl UnwindSafe for Replacement
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