Trait torin::dom_adapter::DOMAdapter
source · pub trait DOMAdapter<NodeKey> {
// Required methods
fn get_node(&self, node_id: &NodeKey) -> Option<Node>;
fn height(&self, node_id: &NodeKey) -> Option<u16>;
fn parent_of(&self, node_id: &NodeKey) -> Option<NodeKey>;
fn children_of(&mut self, node_id: &NodeKey) -> Vec<NodeKey>;
fn is_node_valid(&mut self, node_id: &NodeKey) -> bool;
fn closest_common_parent(
&self,
node_id_a: &NodeKey,
node_id_b: &NodeKey
) -> Option<(NodeKey, FxHashSet<NodeKey>)>;
}
Required Methods§
sourcefn children_of(&mut self, node_id: &NodeKey) -> Vec<NodeKey>
fn children_of(&mut self, node_id: &NodeKey) -> Vec<NodeKey>
Get the children of a Node
sourcefn is_node_valid(&mut self, node_id: &NodeKey) -> bool
fn is_node_valid(&mut self, node_id: &NodeKey) -> bool
Check whether the given Node is valid (isn’t a placeholder, unconnected node..)
sourcefn closest_common_parent(
&self,
node_id_a: &NodeKey,
node_id_b: &NodeKey
) -> Option<(NodeKey, FxHashSet<NodeKey>)>
fn closest_common_parent( &self, node_id_a: &NodeKey, node_id_b: &NodeKey ) -> Option<(NodeKey, FxHashSet<NodeKey>)>
Get the closest common parent Node of two Nodes