pub struct CstNode<T> {
pub node: T,
pub leading: Vec<Trivia>,
pub trailing: Vec<Trivia>,
}Expand description
A CST node — an AST node with its leading and trailing trivia.
This is a generic wrapper that preserves the trivia around a node so that the source can be reconstructed.
Fields§
§node: TThe AST node itself.
leading: Vec<Trivia>Trivia before this node (comments + whitespace).
trailing: Vec<Trivia>Trivia after this node (comments + whitespace).
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for CstNode<T>where
T: Freeze,
impl<T> RefUnwindSafe for CstNode<T>where
T: RefUnwindSafe,
impl<T> Send for CstNode<T>where
T: Send,
impl<T> Sync for CstNode<T>where
T: Sync,
impl<T> Unpin for CstNode<T>where
T: Unpin,
impl<T> UnsafeUnpin for CstNode<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for CstNode<T>where
T: UnwindSafe,
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