Trait freya::prelude::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, Global>;
    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>;
}

Required Methods§

source

fn get_node(&self, node_id: &NodeKey) -> Option<Node>

Get the Node size

source

fn height(&self, node_id: &NodeKey) -> Option<u16>

Get the height in the DOM of the given Node

source

fn parent_of(&self, node_id: &NodeKey) -> Option<NodeKey>

Get the parent of a Node

source

fn children_of(&mut self, node_id: &NodeKey) -> Vec<NodeKey, Global>

Get the children of a Node

source

fn is_node_valid(&mut self, node_id: &NodeKey) -> bool

Check whether the given Node is valid (isn’t a placeholder, unconnected node..)

source

fn closest_common_parent( &self, node_id_a: &NodeKey, node_id_b: &NodeKey ) -> Option<NodeKey>

Get the closest common parent Node of two Nodes

Implementations on Foreign Types§

§

impl DOMAdapter<EntityId> for DioxusDOMAdapter<'_>

§

fn get_node(&self, node_id: &EntityId) -> Option<Node>

§

fn height(&self, node_id: &EntityId) -> Option<u16>

§

fn parent_of(&self, node_id: &EntityId) -> Option<EntityId>

§

fn children_of(&mut self, node_id: &EntityId) -> Vec<EntityId, Global>

§

fn is_node_valid(&mut self, node_id: &EntityId) -> bool

§

fn closest_common_parent( &self, node_id_a: &EntityId, node_id_b: &EntityId ) -> Option<EntityId>

Implementors§