1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
//! Operational Transformation (OT)
//!
//! This module provides operational transformation for concurrent text editing.
//! OT allows multiple users to edit the same document concurrently while
//! maintaining consistency.
pub use ;
pub use ;
use crateSyncResult;
use ;
/// Tie-breaking priority used by [`Transform::transform`] when both operands
/// insert content at the same position concurrently.
///
/// Operational transformation cannot infer, from the operations alone, which
/// of two concurrent insertions at the same point should end up first in the
/// merged document -- that choice has to be made consistently by the caller.
/// [`composer::transform_pair`] assigns [`Priority::Left`] to one operand and
/// [`Priority::Right`] to the other so that both `transform()` calls in the
/// pair agree on the same tie-break, which is required for the standard OT
/// convergence property (TP1): `apply(b', apply(a, s)) == apply(a', apply(b, s))`.
/// Trait for transformable operations