Skip to main content

weavatrix_edit/
lib.rs

1#![forbid(unsafe_code)]
2#![doc = include_str!("../README.md")]
3
4mod application;
5mod coordinates;
6mod error;
7mod limits;
8mod model;
9mod path;
10mod provenance;
11mod validation;
12
13pub use application::{
14    AppliedText, ByteEditBatch, ChangeSummary, EditChunks, OffsetBias, PreparedChange,
15    PreparedChanges, PreparedEdits, WriteSummary, apply_byte_edits, apply_byte_edits_with_limits,
16    apply_edits, apply_edits_with_encoding, apply_edits_with_encoding_and_limits,
17    apply_edits_with_limits, diagnose_byte_edits, diagnose_byte_edits_with_limits, diagnose_edits,
18    diagnose_edits_with_encoding_and_limits, prepare_byte_edits, prepare_byte_edits_owned,
19    prepare_byte_edits_owned_with_limits, prepare_byte_edits_with_limits, prepare_edits,
20    prepare_edits_with_encoding, prepare_edits_with_encoding_and_limits, prepare_edits_with_limits,
21};
22pub use coordinates::LineIndex;
23pub use error::{
24    ByteSpan, DiagnosticLimits, EditError, ErrorCode, MismatchDetails, TextPreview,
25    ValidationReport,
26};
27pub use limits::{ApplyLimits, BatchLimits, LineIndexLimits, PlanLimits};
28pub use model::{
29    ByteEdit, Completeness, EDIT_PLAN_SCHEMA, EditPlan, FileEdit, Position, PositionEncoding,
30    Provenance, TextEdit, TextRange,
31};
32pub use path::{portable_path_key, validate_plan_path};
33pub use validation::{ValidatedEditPlan, validate_edit_plan};
34
35/// Crate version compiled into this library.
36pub const VERSION: &str = env!("CARGO_PKG_VERSION");