Struct yrs::YPathSegment
source · #[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_KEY
means that segment value can be accessed bysegment.value.key
and is referring to a string key used by map component (eg.YMap
entry).Y_EVENT_PATH_INDEX
means that segment value can be accessed bysegment.value.index
and is referring to an int index used by sequence component (eg.YArray
item orYXmlElement
child).
Fields§
§tag: c_char
Tag used to identify which case current segment is referring to:
Y_EVENT_PATH_KEY
means that segment value can be accessed bysegment.value.key
and is referring to a string key used by map component (eg.YMap
entry).Y_EVENT_PATH_INDEX
means that segment value can be accessed bysegment.value.index
and is referring to an int index used by sequence component (eg.YArray
item orYXmlElement
child).
value: YPathSegmentCase
Union field containing either key
or index
. A particular case can be recognized by using
segment’s tag
field.
Trait Implementations§
source§impl Drop for YPathSegment
impl Drop for YPathSegment
source§impl From<PathSegment> for YPathSegment
impl From<PathSegment> for YPathSegment
source§fn from(ps: PathSegment) -> Self
fn from(ps: PathSegment) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for YPathSegment
impl RefUnwindSafe for YPathSegment
impl !Send for YPathSegment
impl !Sync for YPathSegment
impl Unpin for YPathSegment
impl UnwindSafe for YPathSegment
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