Struct yrs::YEventKeyChange
source · #[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_ADD
used to identify a newly added entry. In this case anold_value
field is NULL, whilenew_value
field contains an inserted value.Y_EVENT_KEY_CHANGE_DELETE
used to identify an existing entry being removed. In this case anold_value
field contains the removed value.Y_EVENT_KEY_CHANGE_UPDATE
used to identify an existing entry, which value has been changed. In this caseold_value
field contains replaced value, whilenew_value
contains a newly inserted one.
Fields§
§key: *const c_char
A UTF8-encoded null-terminated string containing a key of a changed entry.
tag: c_char
Tag field informing about type of change current struct refers to:
Y_EVENT_KEY_CHANGE_ADD
used to identify a newly added entry. In this case anold_value
field is NULL, whilenew_value
field contains an inserted value.Y_EVENT_KEY_CHANGE_DELETE
used to identify an existing entry being removed. In this case anold_value
field contains the removed value.Y_EVENT_KEY_CHANGE_UPDATE
used to identify an existing entry, which value has been changed. In this caseold_value
field contains replaced value, whilenew_value
contains a newly inserted one.
old_value: *const YOutput
Contains a removed entry’s value or replaced value of an updated entry.
new_value: *const YOutput
Contains 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