ifc_model/mutation/mod.rs
1//! Mutation: checked edits to entities already in the model.
2//!
3//! ## Internal split
4//!
5//! - `edit.rs`: schema-agnostic edit operations (`set_attribute`, `retype`,
6//! `truncate_attributes`, `remove`) — the mutable counterpart to `insert`/`push`.
7//! - `transaction.rs`: preflight and atomic commit; truncations and the header
8//! are staged beside the edits, not as `Edit` variants.
9//! - `conflict.rs`: ID/reference/index conflict diagnostics.
10//!
11//! - `step.rs`: crate-private primitive writes stored as their own inverse.
12//! - `record.rs`: `begin_recording` / `end_recording` on `Model`.
13//! - `inverse.rs`: `Inverse`, the recorded undo of a run of writes.
14//! - `history.rs`: `History`, a bounded undo and redo stack of inverses.
15//! - `preview.rs`: `Model::preview`, a change that is always rolled back,
16//! revision included.
17//!
18//! `edit.rs`, `record.rs` and `preview.rs` add inherent `Model` methods; `transaction.rs`
19//! owns the batched authoring contract. The public items are re-exported at
20//! the crate root.
21
22mod conflict;
23mod edit;
24mod history;
25mod inverse;
26mod preview;
27mod record;
28mod step;
29mod transaction;
30
31pub use conflict::Conflict;
32pub use history::{History, HistoryError};
33pub use inverse::{Inverse, InverseError, Restored};
34pub(crate) use record::{Recording, Segment};
35pub(crate) use step::Step;
36pub use transaction::{Applied, Edit, Transaction};