pub struct ORMap { /* private fields */ }Expand description
An observed-remove map CRDT backed by per-key LWWRegisters.
Keys can be added and updated. Deletion can be modeled via tombstone conventions at the application layer (not enforced here).
Implementations§
Source§impl ORMap
impl ORMap
Sourcepub fn set(
&mut self,
key: impl Into<String>,
value: impl Into<String>,
timestamp: u64,
writer: impl Into<String>,
)
pub fn set( &mut self, key: impl Into<String>, value: impl Into<String>, timestamp: u64, writer: impl Into<String>, )
Set a key to a value at the given logical timestamp.
§Arguments
key— The map key.value— The string value to store.timestamp— Logical timestamp for LWW resolution.writer— Identifier of the writing agent.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ORMap
impl<'de> Deserialize<'de> for ORMap
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
Auto Trait Implementations§
impl Freeze for ORMap
impl RefUnwindSafe for ORMap
impl Send for ORMap
impl Sync for ORMap
impl Unpin for ORMap
impl UnsafeUnpin for ORMap
impl UnwindSafe for ORMap
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