pub struct SyntaxTree { /* private fields */ }Expand description
A lossless syntax tree of one source text.
The tree owns a copy of the source. Its root is always a
NodeKind::File node that spans the whole text.
Implementations§
Source§impl SyntaxTree
impl SyntaxTree
Sourcepub fn root(&self) -> SyntaxNode<'_>
pub fn root(&self) -> SyntaxNode<'_>
Returns the root node, which covers the whole source text.
Trait Implementations§
Source§impl Clone for SyntaxTree
impl Clone for SyntaxTree
Auto Trait Implementations§
impl Freeze for SyntaxTree
impl RefUnwindSafe for SyntaxTree
impl Send for SyntaxTree
impl Sync for SyntaxTree
impl Unpin for SyntaxTree
impl UnsafeUnpin for SyntaxTree
impl UnwindSafe for SyntaxTree
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