Type Alias freya_native_core::tree::TreeRefView

source ·
pub type TreeRefView<'a> = View<'a, Node>;
Expand description

A view of a tree.

Aliased Type§

struct TreeRefView<'a> { /* private fields */ }

Trait Implementations§

source§

impl<'a> TreeRef for TreeRefView<'a>

source§

fn parent_id(&self, id: NodeId) -> Option<NodeId>

The parent id of the node.
source§

fn children_ids(&self, id: NodeId) -> Vec<NodeId>

The children ids of the node.
source§

fn height(&self, id: NodeId) -> Option<u16>

The height of the node.
source§

fn contains(&self, id: NodeId) -> bool

Returns true if the node exists.
source§

fn shadow_tree(&self, id: NodeId) -> Option<&ShadowTree>

The shadow tree tree under the node.
source§

fn slot_for_light_tree(&self, id: NodeId) -> Option<NodeId>

The node that contains the shadow tree this node is a slot for
source§

fn root_for_light_tree(&self, id: NodeId) -> Option<NodeId>

The node that contains the shadow tree this node is a root of
source§

fn parent_id_advanced( &self, id: NodeId, enter_shadow_dom: bool, ) -> Option<NodeId>

Get the id of the parent of the current node, if enter_shadow_dom is true and the current node is a shadow root, the node the shadow root is attached to will be returned
source§

fn children_ids_advanced( &self, id: NodeId, enter_shadow_dom: bool, ) -> Vec<NodeId>

Get the ids of the children of the current node, if enter_shadow_dom is true and the current node is a shadow slot, the ids of the nodes under the node the shadow slot is attached to will be returned