Enum noosphere_core::data::MapOperation
source · 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
Fields
§
key: KeyThe key that was updated or inserted
§
value: ValueThe new value associated with the key
A MapOperation that represents an update or insert to a VersionedMapIpld
Remove
Fields
§
key: KeyThe key that was removed
A MapOperation that represents a removal of a key from a VersionedMapIpld
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 copy 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: PartialEq, Value: PartialEq> PartialEq for MapOperation<Key, Value>
impl<Key: PartialEq, Value: PartialEq> PartialEq for MapOperation<Key, Value>
source§fn eq(&self, other: &MapOperation<Key, Value>) -> bool
fn eq(&self, other: &MapOperation<Key, Value>) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl<Key, Value> Serialize for MapOperation<Key, Value>where
Key: Serialize,
Value: Serialize,
impl<Key, Value> Serialize for MapOperation<Key, Value>where Key: Serialize, Value: Serialize,
impl<Key: Eq, Value: Eq> Eq for MapOperation<Key, Value>
impl<Key, Value> StructuralEq for MapOperation<Key, Value>
impl<Key, Value> StructuralPartialEq for MapOperation<Key, Value>
Auto Trait Implementations§
impl<Key, Value> RefUnwindSafe for MapOperation<Key, Value>where Key: RefUnwindSafe, Value: RefUnwindSafe,
impl<Key, Value> Send for MapOperation<Key, Value>where Key: Send, Value: Send,
impl<Key, Value> Sync for MapOperation<Key, Value>where Key: Sync, Value: Sync,
impl<Key, Value> Unpin for MapOperation<Key, Value>where Key: Unpin, Value: Unpin,
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> DagJson for Twhere
T: Serialize + DeserializeOwned,
impl<T> DagJson for Twhere T: Serialize + DeserializeOwned,
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.