Struct yrs::YPathSegment [−][src]
#[repr(C)]pub struct YPathSegment {
pub tag: c_char,
pub value: YPathSegmentCase,
}Expand description
A single segment of a path returned from yevent_path function. It can be one of two cases,
recognized by it’s tag field:
Y_EVENT_PATH_KEYmeans that segment value can be accessed bysegment.value.keyand is referring to a string key used by map component (eg.YMapentry).Y_EVENT_PATH_INDEXmeans that segment value can be accessed bysegment.value.indexand is referring to an int index used by sequence component (eg.YArrayitem orYXmlElementchild).
Fields
tag: c_charTag used to identify which case current segment is referring to:
Y_EVENT_PATH_KEYmeans that segment value can be accessed bysegment.value.keyand is referring to a string key used by map component (eg.YMapentry).Y_EVENT_PATH_INDEXmeans that segment value can be accessed bysegment.value.indexand is referring to an int index used by sequence component (eg.YArrayitem orYXmlElementchild).
value: YPathSegmentCaseUnion field containing either key or index. A particular case can be recognized by using
segment’s tag field.
Trait Implementations
Performs the conversion.
