pub struct Tree {
pub id: NodeId,
pub line_range: Option<LineRange>,
pub node: Node,
pub children: Vec<Tree>,
}Fields§
§id: NodeId§line_range: Option<LineRange>§node: Node§children: Vec<Tree>Implementations§
Source§impl Tree
impl Tree
pub fn new(id: NodeId, node: Node, children: Vec<Tree>) -> Tree
pub fn new_generated(node: Node, children: Vec<Tree>) -> Tree
pub fn with_line_range_generated( line_range: Option<LineRange>, node: Node, children: Vec<Tree>, ) -> Tree
pub fn with_new_ids(&self) -> Tree
pub fn iter(&self) -> TreeIter<'_>
pub fn is_section(&self) -> bool
pub fn is_list(&self) -> bool
pub fn is_quote(&self) -> bool
pub fn extract_sections(&self, keys: HashMap<NodeId, (Key, String)>) -> Tree
pub fn replace(&self, node_id: NodeId, tree: &Tree) -> Tree
pub fn change_list_type(&self, node_id: NodeId) -> Tree
pub fn get_all_inclusion_edge_keys(&self) -> Vec<Key>
pub fn mark_node(&self, node_id: NodeId, start: &str, end: &str) -> Tree
pub fn update_node(&self, target_id: NodeId, inlines: &Vec<Inline>) -> Tree
pub fn pre_sub_header_position(&self) -> usize
pub fn position(&self, id: NodeId) -> usize
pub fn remove_node(&self, target_id: NodeId) -> Tree
pub fn append_pre_header(&self, target_id: NodeId, new: Tree) -> Tree
pub fn attach(&self, new: Tree) -> Tree
pub fn append_after(&self, target_id: NodeId, new: Tree) -> Tree
pub fn id_eq(&self, id: NodeId) -> bool
pub fn from_pointer<'a>(pointer: impl NodePointer<'a>) -> Option<Tree>
pub fn wrap_into_list(&self, node_id: NodeId) -> Tree
pub fn unwrap_list(&self, node_id: NodeId) -> Tree
pub fn change_key(&self, target_key: &Key, updated_key: &Key) -> Tree
pub fn contains(&self, id: NodeId) -> bool
pub fn parent_of(&self, id: NodeId) -> bool
pub fn get_top_level_surrounding_list_id(&self, id: NodeId) -> Option<NodeId>
pub fn get_surrounding_top_level_block(&self, id: NodeId) -> Option<NodeId>
pub fn get_surrounding_list_id(&self, id: NodeId) -> Option<NodeId>
pub fn get_surrounding_section_id(&self, id: NodeId) -> Option<NodeId>
pub fn squash_from_pointer<'a>( pointer: impl NodePointer<'a>, depth: u8, ) -> Vec<Tree>
pub fn find_id(&self, id: NodeId) -> Option<Tree>
pub fn get(&self, id: NodeId) -> Tree
pub fn find_reference_key(&self, id: NodeId) -> Key
pub fn is_header(&self, id: NodeId) -> bool
pub fn is_reference(&self) -> bool
pub fn is_bullet_list(&self) -> bool
pub fn sort_children(&self, node_id: NodeId, reverse: bool) -> Tree
pub fn is_sorted(&self, node_id: NodeId, reverse: bool) -> bool
pub fn remove_inclusion_edges_to(&self, target_key: &Key) -> Tree
pub fn remove_inline_links_to(&self, target_key: &Key) -> Tree
pub fn annotate_references<F>( &self, parent_lookup: &F, parent_key: &str, ) -> Tree
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Tree
impl RefUnwindSafe for Tree
impl Send for Tree
impl Sync for Tree
impl Unpin for Tree
impl UnsafeUnpin for Tree
impl UnwindSafe for Tree
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more