Struct virtual_node::event::VirtualEventNode
source · pub struct VirtualEventNode { /* private fields */ }
Expand description
A tree where each entry holds the events for the corresponding entry in a
crate::VirtualNode
tree.
Implementations§
source§impl VirtualEventNode
impl VirtualEventNode
sourcepub fn as_element(&self) -> Option<&VirtualEventElement>
pub fn as_element(&self) -> Option<&VirtualEventElement>
Get the [VirtualEventNode::VirtualEventElement
] variant.
sourcepub fn as_element_mut(&mut self) -> Option<&mut VirtualEventElement>
pub fn as_element_mut(&mut self) -> Option<&mut VirtualEventElement>
Get a mutable reference to the [VirtualEventNode::VirtualEventElement
] variant.
sourcepub fn previous_sibling(&self) -> Option<&Rc<RefCell<VirtualEventNode>>>
pub fn previous_sibling(&self) -> Option<&Rc<RefCell<VirtualEventNode>>>
Get the previous sibling.
sourcepub fn next_sibling(&self) -> Option<&Rc<RefCell<VirtualEventNode>>>
pub fn next_sibling(&self) -> Option<&Rc<RefCell<VirtualEventNode>>>
Get the next sibling.
sourcepub fn replace_with_node(&mut self, new: VirtualEventNode)
pub fn replace_with_node(&mut self, new: VirtualEventNode)
Replace a node with another.
The new node is given the same siblings as the old node.
sourcepub fn remove_node_from_siblings(
&mut self,
child: &Rc<RefCell<VirtualEventNode>>
)
pub fn remove_node_from_siblings(
&mut self,
child: &Rc<RefCell<VirtualEventNode>>
)
Remove a child node from it’s siblings.
sourcepub fn insert_before(
&mut self,
new: Rc<RefCell<VirtualEventNode>>,
existing: Rc<RefCell<VirtualEventNode>>
)
pub fn insert_before(
&mut self,
new: Rc<RefCell<VirtualEventNode>>,
existing: Rc<RefCell<VirtualEventNode>>
)
Insert a node before another node.