#[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§
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