Skip to main content

Module op

Module op 

Source
Expand description

The JSON-Patch-style op shared by every patch tool, and its parsing with teaching errors.

StructsΒ§

PatchOp
One edit. Which fields an op takes depends on op and the tool; parsing checks them.
Transfer
What a move or copy takes and where it puts it.

EnumsΒ§

Op
One op after parse_ops: it has every field its tool requires for it and no field it doesn’t take.
OpKind
What a patch op does, as agents name it in op.
PatchTarget
Which patch tool the ops are for; decides the allowed ops and fields.
Position
Where an op puts items: next to the sibling at path, or at an end of the list at path.

ConstantsΒ§

ALL_FIELDS πŸ”’
REORDER_ON_PAGE_FIX πŸ”’

FunctionsΒ§

check_unknown_fields πŸ”’
field_not_allowed πŸ”’
from_wire_name πŸ”’
The unit variant whose wire name is name.
invalid_position πŸ”’
missing_field πŸ”’
optional_string πŸ”’
parse_op πŸ”’
parse_ops
Parses raw op objects, rejecting unknown fields and fields the op doesn’t take.
quote_list πŸ”’
items double-quoted and comma-separated, for error messages.