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§
- Change
Perm - Permission change payload (FDD-03 §9.3, node-addressed).
- Create
File - Create file payload (FDD-03 §9.3).
- Create
Symlink - Symlink creation payload (FDD-03 §9.3). Note tag order:
path(1), thennode_id(2), thentarget(3). - Delete
Node - Delete a node (FDD-03 §9.3; the wire tag is retained as
delete_file). The preimage is discriminated byold_node_kind: text/binary file nodes carryold_blob_id+old_mode; symlink nodes carryold_target. - Edit
Text - Text edit payload using content-anchor identity.
- Operation
- A single operation inside a patch.
- Patch
Payload - Patch payload.
- Rename
Path - Rename path payload (FDD-03 §9.3, node-addressed).
- Replace
Binary - Binary replacement payload.
Enums§
- Delete
Node Preimage - Discriminated deletion preimage (FDD-03 §9.3).
- Operation
Kind - Operation variants.
- Patch
Purpose - 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.