Struct tree_sitter_md::MarkdownTree
source · pub struct MarkdownTree { /* private fields */ }
Implementations§
source§impl MarkdownTree
impl MarkdownTree
sourcepub fn edit(&mut self, edit: &InputEdit)
pub fn edit(&mut self, edit: &InputEdit)
Edit the block tree and inline trees to keep them in sync with source code that has been edited.
You must describe the edit both in terms of byte offsets and in terms of row/column coordinates.
sourcepub fn block_tree(&self) -> &Tree
pub fn block_tree(&self) -> &Tree
Returns the block tree for the parsed document
sourcepub fn inline_tree(&self, parent: &Node<'_>) -> Option<&Tree>
pub fn inline_tree(&self, parent: &Node<'_>) -> Option<&Tree>
Returns the inline tree for the given inline node.
Returns None
if the given node does not have an associated inline tree. Either because
the nodes type is not inline
or because the inline content is empty.
sourcepub fn inline_trees(&self) -> &[Tree]
pub fn inline_trees(&self) -> &[Tree]
Returns the list of all inline trees
sourcepub fn walk(&self) -> MarkdownCursor<'_>
pub fn walk(&self) -> MarkdownCursor<'_>
Create a new MarkdownCursor
starting from the root of the tree.
Trait Implementations§
source§impl Clone for MarkdownTree
impl Clone for MarkdownTree
source§fn clone(&self) -> MarkdownTree
fn clone(&self) -> MarkdownTree
Returns a copy 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 MarkdownTree
impl RefUnwindSafe for MarkdownTree
impl Send for MarkdownTree
impl Sync for MarkdownTree
impl Unpin for MarkdownTree
impl UnwindSafe for MarkdownTree
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