pub struct TreeNodeData {
pub name: String,
pub type_str: String,
pub node_type: NodeType,
pub node_category: NodeCategory,
pub config: NodeConfig,
pub status: NodeStatus,
pub children: Vec<TreeNode>,
pub ports_fn: fn() -> PortsList,
}Fields§
§name: String§type_str: String§node_type: NodeType§node_category: NodeCategory§config: NodeConfig§status: NodeStatus§children: Vec<TreeNode>Vector of child nodes
ports_fn: fn() -> PortsListImplementations§
Source§impl TreeNodeData
impl TreeNodeData
Sourcepub async fn halt_children(&mut self, start: usize) -> NodeResult<()>
pub async fn halt_children(&mut self, start: usize) -> NodeResult<()>
Halt children from this index to the end.
§Errors
Returns NodeError::IndexError if start is out of bounds.
Sourcepub async fn reset_children(&mut self)
pub async fn reset_children(&mut self)
Halts and resets all children
Sourcepub async fn halt_child_idx(&mut self, index: usize) -> NodeResult<()>
pub async fn halt_child_idx(&mut self, index: usize) -> NodeResult<()>
Halt child at the index. Not to be confused with halt_child(), which is
a helper that calls halt_child_idx(0), primarily used for Decorator nodes.
Sourcepub fn set_status(&mut self, status: NodeStatus)
pub fn set_status(&mut self, status: NodeStatus)
Sets the status of this node
Sourcepub async fn halt_child(&mut self)
pub async fn halt_child(&mut self)
Calls halt_child_idx(0). This should only be used in
Decorator nodes
Sourcepub async fn reset_child(&mut self)
pub async fn reset_child(&mut self)
Halts and resets the first child. This should only be used in
Decorator nodes
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TreeNodeData
impl !RefUnwindSafe for TreeNodeData
impl Send for TreeNodeData
impl Sync for TreeNodeData
impl Unpin for TreeNodeData
impl !UnwindSafe for TreeNodeData
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