pub enum Selector {
Key(String),
Index(usize),
}Expand description
What a predicate sees as the second argument: a map key or an array index.
A predicate is called with the child value and its location. Maps pass a
string key. Arrays pass a numeric index. The selector owns its key, so a
closure can match it without fighting a borrowed &&str.
Variants§
Implementations§
Trait Implementations§
impl Eq for Selector
impl StructuralPartialEq for Selector
Auto Trait Implementations§
impl Freeze for Selector
impl RefUnwindSafe for Selector
impl Send for Selector
impl Sync for Selector
impl Unpin for Selector
impl UnsafeUnpin for Selector
impl UnwindSafe for Selector
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