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_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
sourceimpl Drop for YPathSegment
impl Drop for YPathSegment
sourceimpl From<PathSegment> for YPathSegment
impl From<PathSegment> for YPathSegment
sourcefn from(ps: PathSegment) -> Self
fn from(ps: PathSegment) -> Self
Converts to this type from the input type.
Auto Trait Implementations
impl RefUnwindSafe for YPathSegment
impl !Send for YPathSegment
impl !Sync for YPathSegment
impl Unpin for YPathSegment
impl UnwindSafe for YPathSegment
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more