pub struct Traversal {
pub expr: Expression,
pub operators: Vec<TraversalOperator>,
}
Expand description
Traverse an expression to access attributes, object keys or element indices.
Fields§
§expr: Expression
The expression that the access operator is applied to.
operators: Vec<TraversalOperator>
The traversal operators to apply to expr
one of the other.
Implementations§
source§impl Traversal
impl Traversal
sourcepub fn new<E, I>(expr: E, operators: I) -> Selfwhere
E: Into<Expression>,
I: IntoIterator,
I::Item: Into<TraversalOperator>,
pub fn new<E, I>(expr: E, operators: I) -> Selfwhere E: Into<Expression>, I: IntoIterator, I::Item: Into<TraversalOperator>,
Creates a new Traversal
structure from an expression and traversal operators that should
be applied to it.
sourcepub fn builder<T>(expr: T) -> TraversalBuilderwhere
T: Into<Expression>,
pub fn builder<T>(expr: T) -> TraversalBuilderwhere T: Into<Expression>,
Create a new TraversalBuilder
for the given expression.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Traversal
impl<'de> Deserialize<'de> for Traversal
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Format for Traversal
impl Format for Traversal
source§fn format<W>(&self, fmt: &mut Formatter<'_, W>) -> Result<()>where
W: Write,
fn format<W>(&self, fmt: &mut Formatter<'_, W>) -> Result<()>where W: Write,
Formats a HCL structure using a formatter and writes the result to the provided writer. Read more
source§impl From<Traversal> for Expression
impl From<Traversal> for Expression
source§impl<'de> IntoDeserializer<'de, Error> for Traversal
impl<'de> IntoDeserializer<'de, Error> for Traversal
§type Deserializer = MapAccessDeserializer<TraversalAccess>
type Deserializer = MapAccessDeserializer<TraversalAccess>
The type of the deserializer being converted into.
source§fn into_deserializer(self) -> Self::Deserializer
fn into_deserializer(self) -> Self::Deserializer
Convert this value into a deserializer.
source§impl PartialEq<Traversal> for Traversal
impl PartialEq<Traversal> for Traversal
impl Eq for Traversal
impl StructuralEq for Traversal
impl StructuralPartialEq for Traversal
Auto Trait Implementations§
impl RefUnwindSafe for Traversal
impl Send for Traversal
impl Sync for Traversal
impl Unpin for Traversal
impl UnwindSafe for Traversal
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<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.