fn context_attribute_iter(&self) -> AstContextIterator<TagAttribute> {
        let mut buffer = Vec::with_capacity(self.attributes.len());
        for idx in (0..self.attributes.len()).rev() {
            let previous = if idx > 0 {
                self.attributes.get(idx - 1)
            } else {
                None
            };
            let child = &self.attributes[idx];
            let after = self.attributes.get(idx + 1);

            buffer.push((
                IteratorContext {
                    depth: 0,
                    parent: None,
                    previous,
                    next: after,
                },
                child,
            ));
        }

        AstContextIterator { buffer }
    }
/// Create a borrowing iterator over the &[TagAttribute]s of this &[Tag] that iterates over all nested attributes.
/// It visits in a pre-order tree traversal:
/// 1. visits the node itself
/// 2. visits all the child nodes
///
/// Also each attribute is visited with a [IteratorContext] that contains the following information:
/// - the parent attribute of the currently visited one.
/// - the previous attribute in the tree before the visited one (same depth).
/// - the after attribute in the tree that occurs after the visited one (same depth).
Create a borrowing iterator over the &[TagAttribute]s of this &[Tag] that iterates over all nested attributes.
It visits in a pre-order tree traversal:
1. visits the node itself
2. visits all the child nodes

Also each attribute is visited with a [IteratorContext] that contains the following information:
the parent attribute of the currently visited one.
the previous attribute in the tree before the visited one (same depth).
the after attribute in the tree that occurs after the visited one (same depth).
Create a borrowing iterator over the & [ TagAttribute ] s of this & [ Tag ] that iterates over all nested attributes . It visits in a pre - order tree traversal : 1 . visits the node itself 2 . visits all the child nodes Also each attribute is visited with a [ IteratorContext ] that contains the following information : the parent attribute of the currently visited one . the previous attribute in the tree before the visited one ( same depth ) . the after attribute in the tree that occurs after the visited one ( same depth ) .
fn context_attribute_iter(&self) -> AstContextIterator<TagAttribute> {
        let mut buffer = Vec::with_capacity(self.attributes.len());
        for idx in (0..self.attributes.len()).rev() {
            let previous = if idx > 0 {
                self.attributes.get(idx - 1)
            } else {
                None
            };
            let child = &self.attributes[idx];
            let after = self.attributes.get(idx + 1);
            buffer.push((
                IteratorContext {
                    depth: 0,
                    parent: None,
                    previous,
                    next: after,
                },
                child,
            ));
        }
        AstContextIterator { buffer }
    }
fn context_attribute_iter ( & self ) -> AstContextIterator < TagAttribute > { let mut buffer = Vec :: with_capacity ( self . attributes . len ( ) ) ; for idx in ( 0 .. self . attributes . len ( ) ) . rev ( ) { let previous = if idx > 0 { self . attributes . get ( idx - 1 ) } else { None } ; let child = & self . attributes [ idx ] ; let after = self . attributes . get ( idx + 1 ) ; buffer . push ( ( IteratorContext { depth : 0 , parent : None , previous , next : after , } , child , ) ) ; } AstContextIterator { buffer } }
Create a borrowing iterator over the &[TagAttribute]s of this &[Tag] that iterates over all nested attributes.
Create a borrowing iterator over the & [ TagAttribute ] s of this & [ Tag ] that iterates over all nested attributes .
&self
&self