Expand description
Document CRDT
This module provides the main public interface for a CRDT “Document” in Eidetica.
The Doc type serves as the primary entry point for accessing and editing it.
It is a json-ish nested type.
§Usage
use eidetica::crdt::{Doc, traits::CRDT};
let mut doc = Doc::new();
doc.set("name", "Alice");
doc.set("age", 30);
doc.set("user.profile.bio", "Software developer"); // Creates nested structure
// Type-safe retrieval
let name: Option<&str> = doc.get_as("name");
let age: Option<i64> = doc.get_as("age");
// Merge with another document
let mut doc2 = Doc::new();
doc2.set("name", "Bob");
doc2.set("city", "New York");
let merged = doc.merge(&doc2).unwrap();Re-exports§
pub use list::List;pub use path::Path;pub use path::PathBuf;pub use path::PathError;pub use value::Value;
Modules§
- list
- List positioning system and List type for CRDT documents.
- path
- Path types for hierarchical document access.
- value
- Value types for CRDT documents.
Macros§
- path
- Constructs a path with compile-time optimization for literals.
Structs§
Constants§
- DOC_
VERSION - The main CRDT document type for Eidetica.