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§
- Changes are merged ops.
- 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.
- DAG (Directed Acyclic Graph) is a common data structure in distributed system.
Macros§
- A macro for creating
LoroValue. It works just like thejson!macro inserde_json.
Structs§
Changeis a grouped continuous operations that share the same id, timestamp, commit message.- This struct supports reverse repr:
fromcan 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.
LoroAppserves as the library’s primary entry point. It’s constituted by an OpLog and an [AppState].- A handle to a subscription created by GPUI. When dropped, the subscription is cancelled and the callback will no longer be invoked.
- Each node of movable tree has a unique
TreeIDgenerated by Loro.
Enums§
- LoroValue is used to represents the state of CRDT at a given version.
Traits§
Functions§
Type Aliases§
- If it’s the nth Op of a peer, the counter will be n.
- A
HashMapusing a default Fx hasher. - It’s the Lamport clock
- Unique id for each peer. It’s a random u64 by default.