Crate loro_common
source ·Macros§
- A macro for creating
LoroValue
. It works just like thejson!
macro inserde_json
.
Structs§
- This struct supports reverse repr:
from
can be less thanto
. We need this because it’ll make merging deletions easier. - This struct supports reverse repr: CounterSpan’s from can be less than to. But we should use it conservatively. We need this because it’ll make merging deletions easier.
- Each node of movable tree has a unique
TreeID
generated by Loro.
Enums§
- ContainerID includes the Op’s ID and the type. So it’s impossible to have the same ContainerID with conflict ContainerType.
- LoroValue is used to represents the state of CRDT at a given version.
Constants§
- In movable tree, we use a specific
TreeID
to represent the root of ALL deleted tree node.
Traits§
Functions§
Type Aliases§
- If it’s the nth Op of a peer, the counter will be n.
- It’s the Lamport clock
- Unique id for each peer. It’s a random u64 by default.