pub enum PoolError {
DuplicateNodeId(NodeId),
ParentNotFound(NodeId),
ChildNotFound(NodeId),
NodeNotFound(NodeId),
OrphanNode(NodeId),
InvalidParenting {
child: NodeId,
alleged_parent: NodeId,
},
InvalidNodeId {
nodeid: NodeId,
new_node_id: NodeId,
},
EmptyPool,
CyclicReference(NodeId),
InvalidNodeMove(NodeId),
NodeLocked(NodeId),
NodeDeleted(NodeId),
}
Expand description
Represents all possible errors that can occur in the node pool operations.
Variants§
DuplicateNodeId(NodeId)
Error occurs when attempting to add a node with an ID that already exists in the pool.
ParentNotFound(NodeId)
Error occurs when trying to access a parent node that doesn’t exist in the pool.
ChildNotFound(NodeId)
Error occurs when trying to access a child node that doesn’t exist in the pool.
NodeNotFound(NodeId)
Error occurs when trying to access a node that doesn’t exist in the pool.
OrphanNode(NodeId)
Error occurs when a node exists in the pool but has no parent.
InvalidParenting
Error occurs when attempting to establish an invalid parent-child relationship.
InvalidNodeId
Error occurs when attempting to replace a node with a different ID.
EmptyPool
Error occurs when attempting to perform operations on an empty pool.
CyclicReference(NodeId)
Error occurs when attempting to create a cycle in the node hierarchy.
InvalidNodeMove(NodeId)
Error occurs when attempting to move a node to an invalid position.
NodeLocked(NodeId)
Error occurs when attempting to perform operations on a locked node.
NodeDeleted(NodeId)
Error occurs when attempting to perform operations on a deleted node.