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 a Cell then last-write-wins semantics will be used. However if the value is a Bag then multiple values inserted into the same key will be kept. If the value is a Counter 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 inserted 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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Produce a diff. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.