pub enum CrdtAnnotation {
Lww,
Text,
Counter,
List,
MovableList,
Tree,
}Expand description
Per-field CRDT container override. Wire format is the lowercase
kebab-case string each variant maps to (e.g. "text", "movable-list"),
so JSON manifests look the same as before — but a typo like
crdt: "txt" now fails at manifest deserialization with a clear
“unknown variant” error instead of slipping through and erroring at
first write.
Variants intentionally mirror the categories
[pylon_crdt::CrdtFieldKind] knows how to instantiate. New CRDT
container types added to Loro show up as new variants here, plus a
match arm in pylon_crdt::field_kind.
Variants§
Lww
Explicit LWW register (matches the default for most scalar types).
Text
Upgrade string → LoroText for collaborative character-level merge.
Counter
Upgrade int/float → LoroCounter so concurrent increments add
instead of stomping. Reserved — apply_patch returns
“not yet implemented” until the projection layer learns counters.
List
LoroList for ordered collections. Reserved.
MovableList
LoroMovableList for reorderable lists (kanban, prioritized todo).
Reserved.
Tree
LoroTree for hierarchical data (folders, threaded comments).
Reserved.
Implementations§
Trait Implementations§
Source§impl Clone for CrdtAnnotation
impl Clone for CrdtAnnotation
Source§fn clone(&self) -> CrdtAnnotation
fn clone(&self) -> CrdtAnnotation
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more