Skip to main content

Crate ayaml_edit

Crate ayaml_edit 

Source
Expand description

Verified, source-preserving edits for YAML documents built on ayaml’s public API.

Every edit returned by this crate is reparsed and checked against both the expected Value tree and the Event stream before it is returned. Constructs whose source-preserving edit rules are not yet proven exact — anchors, aliases, tags, block scalars, multiple documents, merge-key expansion, and ambiguous comment placement — are refused conservatively.

Structs§

EditError
An error returned when an edit cannot be constructed or verified.
EditOptions
Options controlling how documents are parsed and verified during editing.
MaskedEditError
A view of an EditError whose Display and Debug forms exclude all YAML document text.
TextEdit
A single byte-range replacement against a source string.
VerifiedEdit
The verified result of one or more YAML edits.

Enums§

EditErrorKind
Coarse category of an EditError.
EditOp
One edit operation for apply_batch / apply_batch_with.

Functions§

apply_batch
Apply a batch of EditOps atomically and verify the resulting document.
apply_batch_with
Apply a batch of EditOps atomically using explicit EditOptions.
apply_edits
Apply sorted, non-overlapping TextEdits to input.
remove_entry
Remove the block entry at path, verifying both the resulting value tree and event stream before returning.
remove_entry_with
Remove the block entry at path using explicit EditOptions.
replace_scalar
Replace the scalar at path with replacement, verifying both the resulting value tree and event stream before returning.
replace_scalar_with
Replace the scalar at path with replacement using explicit EditOptions.