Expand description
loro-internal is a CRDT framework.
Re-exports§
pub use event::ContainerDiff;
pub use event::DiffEvent;
pub use event::DocDiff;
pub use event::ListDiff;
pub use event::ListDiffInsertItem;
pub use event::ListDiffItem;
pub use handler::BasicHandler;
pub use handler::HandlerTrait;
pub use handler::ListHandler;
pub use handler::MapHandler;
pub use handler::MovableListHandler;
pub use handler::TextHandler;
pub use handler::TreeHandler;
pub use handler::UnknownHandler;
pub use oplog::OpLog;
pub use undo::UndoManager;
pub use version::VersionVector;
pub use loro_common;
pub use loro_delta;
Modules§
- allocation
- arena
- awareness
- change
- Changes are merged ops.
- configure
- container
- CRDT [Container]. Each container may have different CRDT type ContainerType. Each [Op] has an associated container. It’s the [Container]’s responsibility to calculate the state from the [Op]s.
- cursor
- dag
- DAG (Directed Acyclic Graph) is a common data structure in distributed system.
- delta
- diff
- diff_
calc - encoding
- estimated_
size - event
- handler
- id
- json
- kv_
store - loro
- op
- oplog
- pre_
commit - subscription
- sync
- txn
- undo
- version
Macros§
- array_
mut_ ref - fx_map
- loro_
value - A macro for creating
LoroValue
. It works just like thejson!
macro inserde_json
. - version_
range - vv
Structs§
- Change
Meta Change
is a grouped continuous operations that share the same id, timestamp, commit message.- Counter
Span - This struct supports reverse repr:
from
can be less thanto
. We need this because it’ll make merging deletions easier. - DocState
- Fractional
Index - ID
- It’s the unique ID of an Op represented by PeerID 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.
- 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.
- Loro
Binary Value - LoroDoc
LoroDoc
serves as the library’s primary entry point. It’s constituted by an OpLog and an DocState.- Loro
DocInner - Loro
List Value - Loro
MapValue - Loro
String Value - String
Slice - Subscription
- A handle to a subscription created by GPUI. When dropped, the subscription is cancelled and the callback will no longer be invoked.
- TreeID
- Each node of movable tree has a unique
TreeID
generated by Loro. - Tree
Node - Tree
Node With Children
Enums§
- Container
Type - Loro
Encode Error - Loro
Error - Loro
Tree Error - Loro
Value - LoroValue is used to represents the state of CRDT at a given version.
- Tree
Parent Id
Constants§
- LORO_
VERSION - The version of the loro crate
Traits§
Functions§
Type Aliases§
- Counter
- If it’s the nth Op of a peer, the counter will be n.
- FxHash
Map - A
HashMap
using a default Fx hasher. - IdSpan
Vector - Lamport
- It’s the Lamport clock
- Loro
Result - PeerID
- Unique id for each peer. It’s a random u64 by default.