pub struct NodeData {
pub value: Value,
pub updated_at: f64,
}Expand description
Data stored in a leaf node of the graph.
Combines the actual Value with an updated_at timestamp (Unix epoch
seconds, as used by Gun.js). The timestamp determines conflict resolution:
when two peers send conflicting puts for the same key, the newer timestamp
wins.
§Conflict Resolution
Gun.js uses “last write wins” semantics based on updated_at. If two
peers write to the same key with the same timestamp, the implementation
does not guarantee ordering — this is by design in Gun.js.
Fields§
§value: ValueThe value stored at this node.
updated_at: f64Unix timestamp (seconds) of the last update. Newer wins conflicts.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for NodeData
impl<'de> Deserialize<'de> for NodeData
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>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for NodeData
Auto Trait Implementations§
impl Freeze for NodeData
impl RefUnwindSafe for NodeData
impl Send for NodeData
impl Sync for NodeData
impl Unpin for NodeData
impl UnsafeUnpin for NodeData
impl UnwindSafe for NodeData
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