pub struct EditParams {Show 13 fields
pub path: String,
pub old_string: String,
pub new_string: String,
pub replace_all: bool,
pub create: bool,
pub expected_md5: Option<String>,
pub expected_size: Option<u64>,
pub expected_mtime_ms: Option<u64>,
pub backup: bool,
pub backup_path: Option<String>,
pub evidence: bool,
pub diff_max_lines: usize,
pub allow_lossy_utf8: bool,
}Expand description
Parameters for a file edit operation: path, old/new strings, and flags.
Fields§
§path: String§old_string: String§new_string: String§replace_all: bool§create: bool§expected_md5: Option<String>Optional preimage guards. If provided, ctx_edit fails if the current file preimage differs.
expected_size: Option<u64>§expected_mtime_ms: Option<u64>§backup: boolOptional backup before writing.
backup_path: Option<String>§evidence: boolEmit bounded diff evidence (redacted) by default.
diff_max_lines: usize§allow_lossy_utf8: boolReject invalid UTF-8 by default; allow lossy reads only when explicitly enabled.
Auto Trait Implementations§
impl Freeze for EditParams
impl RefUnwindSafe for EditParams
impl Send for EditParams
impl Sync for EditParams
impl Unpin for EditParams
impl UnsafeUnpin for EditParams
impl UnwindSafe for EditParams
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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