Crate loro_common

Crate loro_common 

Source

Macros§

debug
error
info
loro_value
A macro for creating LoroValue. It works just like the json! macro in serde_json.
trace
warn

Structs§

CompactId
It’s the unique ID of an Op represented by PeerID and Counter.
CompactIdLp
It’s the unique ID of an Op represented by PeerID and Counter.
CounterSpan
This struct supports reverse repr: from can be less than to. We need this because it’ll make merging deletions easier.
ID
It’s the unique ID of an Op represented by PeerID and Counter.
IdFull
It’s the unique ID of an Op represented by PeerID, Lamport clock and Counter.
IdLp
It’s the unique ID of an Op represented by PeerID and Lamport clock. It’s used to define the total order of Ops.
IdLpSpan
IdSpan
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.
InternalString
LamportSpan
LoroBinaryValue
LoroListValue
LoroMapValue
LoroStringValue
TreeID
Each node of movable tree has a unique TreeID generated by Loro.

Enums§

ContainerID
ContainerID includes the Op’s ID and the type. So it’s impossible to have the same ContainerID with conflict ContainerType.
ContainerType
LoroEncodeError
LoroError
LoroTreeError
LoroValue
LoroValue is used to represents the state of CRDT at a given version.

Constants§

DELETED_TREE_ROOT
In movable tree, we use a specific TreeID to represent the root of ALL deleted tree node.

Traits§

HasCounter
HasCounterSpan
HasId
HasIdSpan
HasLamport
HasLamportSpan

Functions§

check_root_container_name
Return whether the given name is a valid root container name.
to_value

Type Aliases§

Counter
If it’s the nth Op of a peer, the counter will be n.
IdSpanVector
Lamport
It’s the Lamport clock
LoroResult
PeerID
Unique id for each peer. It’s a random u64 by default.