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 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CrdtAnnotation
impl Debug for CrdtAnnotation
Source§impl<'de> Deserialize<'de> for CrdtAnnotation
impl<'de> Deserialize<'de> for CrdtAnnotation
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Display for CrdtAnnotation
impl Display for CrdtAnnotation
Source§impl PartialEq for CrdtAnnotation
impl PartialEq for CrdtAnnotation
Source§fn eq(&self, other: &CrdtAnnotation) -> bool
fn eq(&self, other: &CrdtAnnotation) -> bool
self and other values to be equal, and is used by ==.