pub enum MapOperation<Key, Value> {
Add {
key: Key,
value: Value,
},
Remove {
key: Key,
},
}Expand description
A MapOperation represents a single change to a VersionedMapIpld as it may be recorded in a ChangelogIpld.
Variants§
Add
A MapOperation that represents an update or insert to a VersionedMapIpld
Fields
§
key: KeyThe key that was updated or inserted
§
value: ValueThe new value associated with the key
Remove
A MapOperation that represents a removal of a key from a VersionedMapIpld
Fields
§
key: KeyThe key that was removed
Trait Implementations§
Source§impl<Key: Clone, Value: Clone> Clone for MapOperation<Key, Value>
impl<Key: Clone, Value: Clone> Clone for MapOperation<Key, Value>
Source§fn clone(&self) -> MapOperation<Key, Value>
fn clone(&self) -> MapOperation<Key, Value>
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 moreSource§impl<'de, Key, Value> Deserialize<'de> for MapOperation<Key, Value>where
Key: Deserialize<'de>,
Value: Deserialize<'de>,
impl<'de, Key, Value> Deserialize<'de> for MapOperation<Key, Value>where
Key: Deserialize<'de>,
Value: Deserialize<'de>,
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
Source§impl<Key, Value> Serialize for MapOperation<Key, Value>
impl<Key, Value> Serialize for MapOperation<Key, Value>
impl<Key: Eq, Value: Eq> Eq for MapOperation<Key, Value>
impl<Key, Value> StructuralPartialEq for MapOperation<Key, Value>
Auto Trait Implementations§
impl<Key, Value> Freeze for MapOperation<Key, Value>
impl<Key, Value> RefUnwindSafe for MapOperation<Key, Value>where
Key: RefUnwindSafe,
Value: RefUnwindSafe,
impl<Key, Value> Send for MapOperation<Key, Value>
impl<Key, Value> Sync for MapOperation<Key, Value>
impl<Key, Value> Unpin for MapOperation<Key, Value>
impl<Key, Value> UnwindSafe for MapOperation<Key, Value>where
Key: UnwindSafe,
Value: UnwindSafe,
Blanket Implementations§
Source§impl<T> Base64Encode for Twhere
T: DagJson,
impl<T> Base64Encode for Twhere
T: DagJson,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> DagJson for Twhere
T: Serialize + DeserializeOwned,
impl<T> DagJson for Twhere
T: Serialize + DeserializeOwned,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.