pub struct Vector<'a> {
pub leaves: Vec<VectorLeaf<'a>>,
pub source_text: &'a str,
}
Expand description
A vector that allows for linear traversal through the leafs of an AST.
This representation of the tree leaves is much more convenient for things like dynamic programming, and provides useful for formatting.
Fields§
§leaves: Vec<VectorLeaf<'a>>
The leaves of the AST, build with an in-order traversal
source_text: &'a str
The full source text that the AST refers to
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Vector<'a>
impl<'a> RefUnwindSafe for Vector<'a>
impl<'a> Send for Vector<'a>
impl<'a> Sync for Vector<'a>
impl<'a> Unpin for Vector<'a>
impl<'a> UnwindSafe for Vector<'a>
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