pub struct ResourceState {
pub crdt: DiamondCRDT,
pub last_sync: SystemTime,
pub seen_versions: HashSet<String>,
pub merge_type: String,
}Expand description
The state of a single collaborative resource.
Each resource maintains its own CRDT instance along with synchronization metadata. State is protected by a Mutex for safe concurrent access from multiple async tasks.
Fields§
§crdt: DiamondCRDTThe document’s CRDT with full operation history
last_sync: SystemTimeWhen this resource was last modified
seen_versions: HashSet<String>Set of version IDs seen for this resource (for idempotence)
merge_type: StringThe merge strategy for this resource (e.g., “diamond”, “sync9”)
Trait Implementations§
Source§impl Clone for ResourceState
impl Clone for ResourceState
Source§fn clone(&self) -> ResourceState
fn clone(&self) -> ResourceState
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ResourceState
impl !RefUnwindSafe for ResourceState
impl Send for ResourceState
impl !Sync for ResourceState
impl Unpin for ResourceState
impl !UnwindSafe for ResourceState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more