pub struct NodeWithTrivia {
pub node: Node,
pub leading_trivia: Vec<TriviaToken>,
pub trailing_trivia: Vec<TriviaToken>,
}Expand description
Trivia types attached to AST nodes for formatting preservation. A node with attached trivia
Fields§
§node: NodeThe actual AST node
leading_trivia: Vec<TriviaToken>Trivia that appears before this node
trailing_trivia: Vec<TriviaToken>Trivia that appears after this node
Trait Implementations§
Source§impl Clone for NodeWithTrivia
impl Clone for NodeWithTrivia
Source§fn clone(&self) -> NodeWithTrivia
fn clone(&self) -> NodeWithTrivia
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for NodeWithTrivia
impl RefUnwindSafe for NodeWithTrivia
impl Send for NodeWithTrivia
impl Sync for NodeWithTrivia
impl Unpin for NodeWithTrivia
impl UnsafeUnpin for NodeWithTrivia
impl UnwindSafe for NodeWithTrivia
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