pub struct MapDiff<V, R = DefaultMapPathResolver>(/* private fields */);
Methods from Deref<Target = IndexMap<String, DiffResult<V>>>§
Sourcepub fn len(&self) -> usize
pub fn len(&self) -> usize
Return the number of key-value pairs in the map.
Computes in O(1) time.
Sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
Returns true if the map contains no elements.
Computes in O(1) time.
Sourcepub fn iter(&self) -> Iter<'_, K, V>
pub fn iter(&self) -> Iter<'_, K, V>
Return an iterator over the key-value pairs of the map, in their order
Sourcepub fn keys(&self) -> Keys<'_, K, V>
pub fn keys(&self) -> Keys<'_, K, V>
Return an iterator over the keys of the map, in their order
Sourcepub fn values(&self) -> Values<'_, K, V>
pub fn values(&self) -> Values<'_, K, V>
Return an iterator over the values of the map, in their order
Sourcepub fn contains_key<Q>(&self, key: &Q) -> bool
pub fn contains_key<Q>(&self, key: &Q) -> bool
Return true
if an equivalent to key
exists in the map.
Computes in O(1) time (average).
Sourcepub fn get<Q>(&self, key: &Q) -> Option<&V>
pub fn get<Q>(&self, key: &Q) -> Option<&V>
Return a reference to the value stored for key
, if it is present,
else None
.
Computes in O(1) time (average).
Sourcepub fn get_key_value<Q>(&self, key: &Q) -> Option<(&K, &V)>
pub fn get_key_value<Q>(&self, key: &Q) -> Option<(&K, &V)>
Return references to the key-value pair stored for key
,
if it is present, else None
.
Computes in O(1) time (average).
Sourcepub fn get_index_of<Q>(&self, key: &Q) -> Option<usize>
pub fn get_index_of<Q>(&self, key: &Q) -> Option<usize>
Return item index, if it exists in the map
Computes in O(1) time (average).
Trait Implementations§
Source§impl<'de, V, R> Deserialize<'de> for MapDiff<V, R>where
V: Deserialize<'de>,
impl<'de, V, R> Deserialize<'de> for MapDiff<V, R>where
V: 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<T, R> DiffOwnChanges for MapDiff<T, R>
impl<T, R> DiffOwnChanges for MapDiff<T, R>
fn get_own_changes(&self) -> Vec<(Cow<'_, str>, DiffResultType)>
Auto Trait Implementations§
impl<V, R> Freeze for MapDiff<V, R>
impl<V, R> RefUnwindSafe for MapDiff<V, R>where
R: RefUnwindSafe,
V: RefUnwindSafe,
impl<V, R> Send for MapDiff<V, R>
impl<V, R> Sync for MapDiff<V, R>
impl<V, R> Unpin for MapDiff<V, R>
impl<V, R> UnwindSafe for MapDiff<V, R>where
R: UnwindSafe,
V: UnwindSafe,
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