pub struct EditParams {Show 14 fields
pub path: String,
pub old_string: String,
pub new_string: String,
pub replace_all: bool,
pub create: bool,
pub expected_blake3: 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_artifact: 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_blake3: Option<String>Optional preimage guards. If provided, ctx_edit fails if the current file preimage differs.
The content guard is BLAKE3, named for what it is (#1592); the wire
parameter expected_md5 stays accepted as an alias for existing callers.
expected_size: Option<u64>§expected_mtime_ms: Option<u64>§backup: boolOptional backup before writing.
backup_path: Option<String>§evidence: boolEmit the digests and the bounded, redacted diff in the result.
diff_artifact: boolWithout evidence: archive the diff for a host renderer and name it
in a short [diff:<id>] trailer (see diff_artifact_trailer).
diff_max_lines: usize§allow_lossy_utf8: boolReject invalid UTF-8 by default; allow lossy reads only when explicitly enabled.
Auto Trait Implementations§
impl Forget for EditParams
impl Freeze for EditParams
impl Move 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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