Struct mergable::Dict [−][src]
pub struct Dict<K, V, Seq> { /* fields omitted */ }
Expand description
A mergable dictionary.
- This dict must contain a
Mergable
value. This determines the semantics on conflict. For example if the value is aCell
then last-write-wins semantics will be used. However if the value is aBag
then multiple values inserted into the same key will be kept. If the value is aCounter
than conflicting values will be summed.
Implementations
Insert a value into the map.
-
Note that if the value is already in the map the two values will be merged. If you do not want this to occur
delete
the value first. -
Also note that this updates the key’s creation time meaning that deletes on the previous key will no longer be respected.
-
TODO: Weird revival stuff.
Remove a value from the map.
- Note that the semantics of this operation can be confusing read the description carefully.
- This removes the known version of the element in the map and all older versions. Unknown modifications will not prevent deletion but if the element has been
insert
ed again after the version that we are aware of that insert will be preserved. Also note that due to merging semantics that may result in values from the known version “reappearing”.
Trait Implementations
Auto Trait Implementations
impl<K, V, Seq> RefUnwindSafe for Dict<K, V, Seq> where
K: RefUnwindSafe,
Seq: RefUnwindSafe,
V: RefUnwindSafe,
impl<K, V, Seq> UnwindSafe for Dict<K, V, Seq> where
K: UnwindSafe,
Seq: UnwindSafe,
V: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more