pub struct Field {
pub name: String,
pub keys: Vec<IndexExpr>,
}Expand description
A single field in a path expression.
Each field has a name and zero or more index keys. For example, in the path
resource.attributes["key"], there are two fields: Field { name: "resource", keys: [] }
and Field { name: "attributes", keys: [IndexExpr::String("key")] }.
Pre-allocated at parse time and stored in [ResolvedPath]; on the hot path the evaluator
passes &[Field] by reference with zero allocation and zero copy.
Fields§
§name: StringIdentifier for this field segment.
keys: Vec<IndexExpr>Index keys attached to this field (e.g. ["key"], [0]).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Field
impl RefUnwindSafe for Field
impl Send for Field
impl Sync for Field
impl Unpin for Field
impl UnsafeUnpin for Field
impl UnwindSafe for Field
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<'p, T> Seq<'p, T> for Twhere
T: Clone,
impl<'p, T> Seq<'p, T> for Twhere
T: Clone,
Source§impl<T, S> SpanWrap<S> for Twhere
S: WrappingSpan<T>,
impl<T, S> SpanWrap<S> for Twhere
S: WrappingSpan<T>,
Source§fn with_span(self, span: S) -> <S as WrappingSpan<Self>>::Spanned
fn with_span(self, span: S) -> <S as WrappingSpan<Self>>::Spanned
Invokes
WrappingSpan::make_wrapped to wrap an AST node in a span.