Expand description
Sync item data structure.
The SyncItem is the core data unit that flows through the sync engine.
Each item has a hierarchical ID (reverse DNS style), version, and binary content.
§Binary Content
The content field is Vec<u8> - raw bytes that sync-engine treats as opaque.
The caller is responsible for serialization (JSON, MessagePack, Cap’n Proto, etc.).
use sync_engine::SyncItem;
use serde_json::json;
// Store JSON as bytes
let json_bytes = serde_json::to_vec(&json!({"name": "Alice"})).unwrap();
let item = SyncItem::new("user.123".into(), json_bytes);
// Or store any binary format
let binary_data = vec![0x01, 0x02, 0x03];
let item = SyncItem::new("binary.456".into(), binary_data);Structs§
- Sync
Item - A wrapper struct that separates metadata from content.
Enums§
- Content
Type - Content type classification for storage routing.