pub struct EditFile { /* private fields */ }Expand description
Targeted file edit. Locks the file, re-reads under lock, verifies the unique-match invariant, writes to a temp sibling, and atomically renames into place — fixing the v0.1 TOCTOU race between read and write.
Unsandboxed by default. Use EditFile::with_sandbox when exposed to
hostile LLM output.
Implementations§
Source§impl EditFile
impl EditFile
pub fn new() -> Self
pub fn with_sandbox(sandbox: Arc<FilesystemRoot>) -> Self
Trait Implementations§
Auto Trait Implementations§
impl Freeze for EditFile
impl RefUnwindSafe for EditFile
impl Send for EditFile
impl Sync for EditFile
impl Unpin for EditFile
impl UnsafeUnpin for EditFile
impl UnwindSafe for EditFile
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