pub struct TreeNode { /* private fields */ }Expand description
A node in the Ember+ tree.
Implementations§
Source§impl TreeNode
impl TreeNode
Sourcepub fn new_parameter(number: i32, value: EmberValue) -> Self
pub fn new_parameter(number: i32, value: EmberValue) -> Self
Create a new parameter node.
Sourcepub fn contents(&self) -> &NodeContents
pub fn contents(&self) -> &NodeContents
Get the node contents.
Sourcepub fn contents_mut(&mut self) -> &mut NodeContents
pub fn contents_mut(&mut self) -> &mut NodeContents
Get mutable node contents.
Sourcepub fn identifier(&self) -> Option<&str>
pub fn identifier(&self) -> Option<&str>
Get the identifier.
Sourcepub fn description(&self) -> Option<&str>
pub fn description(&self) -> Option<&str>
Get the description.
Sourcepub fn is_parameter(&self) -> bool
pub fn is_parameter(&self) -> bool
Check if this is a parameter.
Sourcepub fn is_function(&self) -> bool
pub fn is_function(&self) -> bool
Check if this is a function.
Sourcepub fn value(&self) -> Option<&EmberValue>
pub fn value(&self) -> Option<&EmberValue>
Get the parameter value if this is a parameter.
Sourcepub fn set_value(&mut self, new_value: EmberValue)
pub fn set_value(&mut self, new_value: EmberValue)
Set the parameter value.
Sourcepub fn add_child(&mut self, child: TreeNodeRef)
pub fn add_child(&mut self, child: TreeNodeRef)
Add a child node.
Sourcepub fn get_child(&self, number: i32) -> Option<TreeNodeRef>
pub fn get_child(&self, number: i32) -> Option<TreeNodeRef>
Get a child by number.
Sourcepub fn children(&self) -> impl Iterator<Item = &TreeNodeRef>
pub fn children(&self) -> impl Iterator<Item = &TreeNodeRef>
Get all children.
Sourcepub fn update_from_glow_node(&mut self, glow: &GlowNode)
pub fn update_from_glow_node(&mut self, glow: &GlowNode)
Update from a Glow node.
Sourcepub fn update_from_glow_parameter(&mut self, glow: &GlowParameter)
pub fn update_from_glow_parameter(&mut self, glow: &GlowParameter)
Update from a Glow parameter.
Sourcepub fn update_from_glow_function(&mut self, glow: &GlowFunction)
pub fn update_from_glow_function(&mut self, glow: &GlowFunction)
Update from a Glow function.
Sourcepub fn update_from_glow_matrix(&mut self, glow: &GlowMatrix)
pub fn update_from_glow_matrix(&mut self, glow: &GlowMatrix)
Update from a Glow matrix.
Sourcepub fn to_glow_element(&self) -> GlowElement
pub fn to_glow_element(&self) -> GlowElement
Convert to a Glow element (non-qualified, for nested children).
Sourcepub fn to_qualified_glow_element(&self, path: &EmberPath) -> GlowElement
pub fn to_qualified_glow_element(&self, path: &EmberPath) -> GlowElement
Convert to a qualified Glow element with full path. This is the correct format for server responses.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TreeNode
impl !RefUnwindSafe for TreeNode
impl Send for TreeNode
impl Sync for TreeNode
impl Unpin for TreeNode
impl UnsafeUnpin for TreeNode
impl !UnwindSafe for TreeNode
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