Skip to main content

weavatrix_edit/
lib.rs

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