pub enum PathSeg {
Key(String),
Index(usize),
}Expand description
One step in a parsed path. Either a YAML mapping key or a sequence
index. Indices may only appear after a sequence-valued parent;
validation happens at apply time, not at parse time.
Variants§
Key(String)
foo, bar — a YAML mapping key.
Index(usize)
[N] — a YAML sequence index. Stored as usize so the
callers (get/set/delete) never have to range-check at use site;
negative indices are rejected in parse_path.
Trait Implementations§
impl Eq for PathSeg
impl StructuralPartialEq for PathSeg
Auto Trait Implementations§
impl Freeze for PathSeg
impl RefUnwindSafe for PathSeg
impl Send for PathSeg
impl Sync for PathSeg
impl Unpin for PathSeg
impl UnsafeUnpin for PathSeg
impl UnwindSafe for PathSeg
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.