pub struct ProtocolComponentStateDelta {
pub component_id: ComponentId,
pub updated_attributes: HashMap<AttrStoreKey, StoreVal>,
pub deleted_attributes: HashSet<AttrStoreKey>,
}Fields§
§component_id: ComponentId§updated_attributes: HashMap<AttrStoreKey, StoreVal>§deleted_attributes: HashSet<AttrStoreKey>Implementations§
Source§impl ProtocolComponentStateDelta
impl ProtocolComponentStateDelta
pub fn new( component_id: &str, updated_attributes: HashMap<AttrStoreKey, StoreVal>, deleted_attributes: HashSet<AttrStoreKey>, ) -> Self
Sourcepub fn merge(
&mut self,
other: ProtocolComponentStateDelta,
) -> Result<(), MergeError>
pub fn merge( &mut self, other: ProtocolComponentStateDelta, ) -> Result<(), MergeError>
Merges this update with another one.
The method combines two ProtocolComponentStateDelta instances if they are for the same
protocol component.
NB: It is assumed that other is a more recent update than self is and the two are
combined accordingly.
§Errors
This method will return CoreError::MergeError if any of the above
conditions is violated.
Trait Implementations§
Source§impl Clone for ProtocolComponentStateDelta
impl Clone for ProtocolComponentStateDelta
Source§fn clone(&self) -> ProtocolComponentStateDelta
fn clone(&self) -> ProtocolComponentStateDelta
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 Debug for ProtocolComponentStateDelta
impl Debug for ProtocolComponentStateDelta
Source§impl<'de> Deserialize<'de> for ProtocolComponentStateDelta
impl<'de> Deserialize<'de> for ProtocolComponentStateDelta
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 From<ProtocolComponentStateDelta> for ProtocolStateDelta
impl From<ProtocolComponentStateDelta> for ProtocolStateDelta
Source§fn from(value: ProtocolComponentStateDelta) -> Self
fn from(value: ProtocolComponentStateDelta) -> Self
Converts to this type from the input type.
impl StructuralPartialEq for ProtocolComponentStateDelta
Auto Trait Implementations§
impl Freeze for ProtocolComponentStateDelta
impl RefUnwindSafe for ProtocolComponentStateDelta
impl Send for ProtocolComponentStateDelta
impl Sync for ProtocolComponentStateDelta
impl Unpin for ProtocolComponentStateDelta
impl UnwindSafe for ProtocolComponentStateDelta
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