pub enum MetadataChange {
Added {
key: String,
value: String,
},
Removed {
key: String,
prev_value: String,
},
Updated {
key: String,
prev_value: String,
new_value: String,
},
}Expand description
One metadata-key change between two CapabilitySets.
Renamed keys surface as Removed { old_key } + Added { new_key },
not Updated, because key identity changes are semantically
distinct from value changes.
Variants§
Added
Key was not present in prev; now has value.
Removed
Key was present in prev with prev_value; no longer in self.
Updated
Key present in both; value changed.
Trait Implementations§
Source§impl Clone for MetadataChange
impl Clone for MetadataChange
Source§fn clone(&self) -> MetadataChange
fn clone(&self) -> MetadataChange
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MetadataChange
impl Debug for MetadataChange
Source§impl PartialEq for MetadataChange
impl PartialEq for MetadataChange
Source§fn eq(&self, other: &MetadataChange) -> bool
fn eq(&self, other: &MetadataChange) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for MetadataChange
Auto Trait Implementations§
impl Freeze for MetadataChange
impl RefUnwindSafe for MetadataChange
impl Send for MetadataChange
impl Sync for MetadataChange
impl Unpin for MetadataChange
impl UnsafeUnpin for MetadataChange
impl UnwindSafe for MetadataChange
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