Skip to main content

Module patch

Module patch 

Source
Expand description

Patch payload types.

Split into two files (DC-58): this file keeps PatchPayload/PatchPurpose/Operation/ OperationKind and the text-span helpers; patch/operations.rs holds the seven per-kind payload structs (CreateFile, DeleteNode, …). All items stay pub and are re-exported here at the same path (payload::patch::*), so every existing caller — including the crate-root re-export at payload.rs — is unaffected. No behaviour change.

Structs§

ChangePerm
Permission change payload (FDD-03 §9.3, node-addressed).
CreateFile
Create file payload (FDD-03 §9.3).
CreateSymlink
Symlink creation payload (FDD-03 §9.3). Note tag order: path (1), then node_id (2), then target (3).
DeleteNode
Delete a node (FDD-03 §9.3; the wire tag is retained as delete_file). The preimage is discriminated by old_node_kind: text/binary file nodes carry old_blob_id + old_mode; symlink nodes carry old_target.
EditText
Text edit payload using content-anchor identity.
Operation
A single operation inside a patch.
PatchPayload
Patch payload.
RenamePath
Rename path payload (FDD-03 §9.3, node-addressed).
ReplaceBinary
Binary replacement payload.

Enums§

DeleteNodePreimage
Discriminated deletion preimage (FDD-03 §9.3).
OperationKind
Operation variants.
PatchPurpose
Identity-bearing patch purpose.

Constants§

TEXT_SPAN_HASH_BYTES
Number of bytes in a content-anchored text span hash.

Functions§

text_span_hash
Compute the stable hash used by content-anchored text edit preconditions.
validate_text_anchor_id
Validate a stable content-anchor identifier.