diff --git a/src/tree_item.rs b/src/tree_item.rs index 37d706d..130b6f2 100644 --- a/src/tree_item.rs +++ b/src/tree_item.rs @@ -90,6 +90,12 @@ where &self.identifier } + /// Get a reference to the text. + #[must_use] + pub const fn text(&self) -> &Text<'text> { + &self.text + } + #[must_use] pub fn children(&self) -> &[Self] { &self.children