pub struct PatchParams {
pub path: String,
pub ops: Vec<AnchorOp>,
pub expected_md5: Option<String>,
pub backup: bool,
pub backup_path: Option<String>,
pub evidence: bool,
pub diff_max_lines: usize,
pub allow_lossy_utf8: bool,
pub validate_syntax: bool,
}Expand description
Parameters for an anchored patch: the target file and one or more anchored
edit ops, plus optional guards/evidence (mirrors EditParams where it makes
sense so the registered wrapper stays uniform).
Fields§
§path: String§ops: Vec<AnchorOp>§expected_md5: Option<String>Optional whole-file preimage guard (BLAKE3 hex, as printed by ctx_edit’s
postimage: line). When set, the edit fails if the file’s hash differs.
backup: bool§backup_path: Option<String>§evidence: bool§diff_max_lines: usize§allow_lossy_utf8: bool§validate_syntax: boolPost-edit tree-sitter gate (#1008): reject a write that turns a cleanly
parsing file into a broken one. Default true; set false to override
(e.g. intentionally writing an incomplete snippet).
Auto Trait Implementations§
impl Freeze for PatchParams
impl RefUnwindSafe for PatchParams
impl Send for PatchParams
impl Sync for PatchParams
impl Unpin for PatchParams
impl UnsafeUnpin for PatchParams
impl UnwindSafe for PatchParams
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