#[non_exhaustive]pub enum Segment {
Field(String),
Index(i64),
Iterate,
Slice {
start: Option<i64>,
end: Option<i64>,
step: Option<i64>,
},
Wildcard,
RecursiveDescent(String),
}Expand description
A single segment of a navigation path.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Field(String)
필드 접근 (.name)
Index(i64)
배열 인덱스 접근 ([0], [-1])
Iterate
배열 이터레이션 ([])
Slice
배열 슬라이싱 ([0:3], [-2:], [::2])
Wildcard
배열 와일드카드 ([*]) — Iterate와 동일 의미
RecursiveDescent(String)
재귀 하강 (..key) — 모든 깊이에서 key 필드를 재귀적으로 수집
Trait Implementations§
impl StructuralPartialEq for Segment
Auto Trait Implementations§
impl Freeze for Segment
impl RefUnwindSafe for Segment
impl Send for Segment
impl Sync for Segment
impl Unpin for Segment
impl UnsafeUnpin for Segment
impl UnwindSafe for Segment
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