#[repr(C)]pub struct YEventKeyChange {
pub key: *const c_char,
pub tag: c_char,
pub old_value: *const YOutput,
pub new_value: *const YOutput,
}Expand description
A data type representing a single change made over a map component of shared collection types,
such as YMap entries or YXmlText/YXmlElement attributes. A key field provides a
corresponding unique key string of a changed entry, while tag field informs about specific
type of change being done:
Y_EVENT_KEY_CHANGE_ADDused to identify a newly added entry. In this case anold_valuefield is NULL, whilenew_valuefield contains an inserted value.Y_EVENT_KEY_CHANGE_DELETEused to identify an existing entry being removed. In this case anold_valuefield contains the removed value.Y_EVENT_KEY_CHANGE_UPDATEused to identify an existing entry, which value has been changed. In this caseold_valuefield contains replaced value, whilenew_valuecontains a newly inserted one.
Fields§
§key: *const c_charA UTF8-encoded null-terminated string containing a key of a changed entry.
tag: c_charTag field informing about type of change current struct refers to:
Y_EVENT_KEY_CHANGE_ADDused to identify a newly added entry. In this case anold_valuefield is NULL, whilenew_valuefield contains an inserted value.Y_EVENT_KEY_CHANGE_DELETEused to identify an existing entry being removed. In this case anold_valuefield contains the removed value.Y_EVENT_KEY_CHANGE_UPDATEused to identify an existing entry, which value has been changed. In this caseold_valuefield contains replaced value, whilenew_valuecontains a newly inserted one.
old_value: *const YOutputContains a removed entry’s value or replaced value of an updated entry.
new_value: *const YOutputContains a value of newly inserted entry or an updated entry’s new value.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for YEventKeyChange
impl !RefUnwindSafe for YEventKeyChange
impl !Send for YEventKeyChange
impl !Sync for YEventKeyChange
impl Unpin for YEventKeyChange
impl !UnwindSafe for YEventKeyChange
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