pub struct Tree { /* private fields */ }
Implementations§
source§impl Tree
impl Tree
pub fn new(name: impl AsRef<str>, icon: impl AsRef<str>) -> Self
pub fn from_encoding(tree: Tree) -> Self
pub fn into_encoding(&self) -> Tree
sourcepub fn get_node_by_line(&self, line: usize) -> Option<Node>
pub fn get_node_by_line(&self, line: usize) -> Option<Node>
Get a Node
by line number.
0-indexed.
sourcepub fn get_node_by_path<'a>(
&self,
path: impl IntoIterator<Item = &'a str>,
auto_create_nodes: bool
) -> Option<Node>
pub fn get_node_by_path<'a>( &self, path: impl IntoIterator<Item = &'a str>, auto_create_nodes: bool ) -> Option<Node>
Get a Node
by path, e.g. /root/a/b/c/d
.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Tree
impl<'de> Deserialize<'de> for Tree
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more