Skip to main content

Crate edit_session

Crate edit_session 

Source
Expand description

A local draft of a value, independent of rendering and the application’s undo engine.

The host validates proposals and owns all document mutations. Dropping a session cancels only its local draft. Store small parameters here, not a full document per pointer event. A context must include stable document/target identity and a revision that changes on every relevant edit (including undo/redo). Comparing values alone cannot detect ABA edits. Values must be independent snapshots: Clone alone does not guarantee isolation if a value shares mutable storage with the host. Equality must cover all relevant fields.

Structs§

Change
A proposed change. The caller must apply it through its existing command engine.
EditSession
A single-use edit. It never writes to a document or records history itself.

Enums§

FinishError
Why a draft cannot be committed to the current host state.