pub struct EmberTree { /* private fields */ }Expand description
The root of an Ember+ tree.
Implementations§
Source§impl EmberTree
impl EmberTree
Sourcepub fn add_root_child(&mut self, node: TreeNode) -> TreeNodeRef
pub fn add_root_child(&mut self, node: TreeNode) -> TreeNodeRef
Add a node at the root level.
Sourcepub fn get_child(&self, number: i32) -> Option<TreeNodeRef>
pub fn get_child(&self, number: i32) -> Option<TreeNodeRef>
Get a root-level child by number.
Sourcepub fn children(&self) -> impl Iterator<Item = &TreeNodeRef>
pub fn children(&self) -> impl Iterator<Item = &TreeNodeRef>
Get all root-level children.
Sourcepub fn get_by_path(&self, path: &[i32]) -> Option<TreeNodeRef>
pub fn get_by_path(&self, path: &[i32]) -> Option<TreeNodeRef>
Get a node by path.
Sourcepub fn get_by_path_str(&self, path: &str) -> Result<Option<TreeNodeRef>>
pub fn get_by_path_str(&self, path: &str) -> Result<Option<TreeNodeRef>>
Get a node by path string (e.g., “0.1.2”).
Sourcepub fn update_from_glow(&mut self, root: &GlowRoot)
pub fn update_from_glow(&mut self, root: &GlowRoot)
Update the tree from a Glow root message.
Sourcepub fn to_glow_elements(&self) -> Vec<GlowElement>
pub fn to_glow_elements(&self) -> Vec<GlowElement>
Convert the tree to Glow elements.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for EmberTree
impl !RefUnwindSafe for EmberTree
impl Send for EmberTree
impl Sync for EmberTree
impl Unpin for EmberTree
impl UnsafeUnpin for EmberTree
impl !UnwindSafe for EmberTree
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