pub struct ProposedEditDiff {
pub path: PathBuf,
pub old_text: String,
pub new_text: String,
}Expand description
The before-and-after text of an edit an agent is asking permission to make.
old_text is what the agent believes it is replacing. It is not reliably the whole
file: opencode sends the entire document, Codex sends only the lines it touches, and both
arrive in the same content[] entry. Deciding which one came is the caller’s job, because
only the caller holds the buffer to compare against (ADR-0016 §1a).
Fields§
§path: PathBuf§old_text: String§new_text: StringTrait Implementations§
Source§impl Clone for ProposedEditDiff
impl Clone for ProposedEditDiff
Source§fn clone(&self) -> ProposedEditDiff
fn clone(&self) -> ProposedEditDiff
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 moreSource§impl Debug for ProposedEditDiff
impl Debug for ProposedEditDiff
impl Eq for ProposedEditDiff
Source§impl PartialEq for ProposedEditDiff
impl PartialEq for ProposedEditDiff
impl StructuralPartialEq for ProposedEditDiff
Auto Trait Implementations§
impl Freeze for ProposedEditDiff
impl RefUnwindSafe for ProposedEditDiff
impl Send for ProposedEditDiff
impl Sync for ProposedEditDiff
impl Unpin for ProposedEditDiff
impl UnsafeUnpin for ProposedEditDiff
impl UnwindSafe for ProposedEditDiff
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