pub trait NodeImmutable<V: FromAnyValue + Send + Sync = ()>: Sized {
Show 13 methods // Required methods fn real_dom(&self) -> &RealDom<V>; fn id(&self) -> NodeId; // Provided methods fn node_type(&self) -> ViewEntry<'_, NodeType<V>> { ... } fn get<'a, T: Component + Sync + Send>(&'a self) -> Option<ViewEntry<'a, T>> { ... } fn children_ids_advanced( &self, id: NodeId, enter_shadow_dom: bool ) -> Vec<NodeId> { ... } fn child_ids(&self) -> Vec<NodeId> { ... } fn children(&self) -> Vec<NodeRef<'_, V>> { ... } fn parent_id_advanced( &self, id: NodeId, enter_shadow_dom: bool ) -> Option<NodeId> { ... } fn parent_id(&self) -> Option<NodeId> { ... } fn parent(&self) -> Option<NodeRef<'_, V>> { ... } fn next(&self) -> Option<NodeRef<'_, V>> { ... } fn prev(&self) -> Option<NodeRef<'_, V>> { ... } fn height(&self) -> u16 { ... }
}
Expand description

A immutable view of a node

Required Methods§

source

fn real_dom(&self) -> &RealDom<V>

Get the real dom this node was created in

source

fn id(&self) -> NodeId

Get the id of the current node

Provided Methods§

source

fn node_type(&self) -> ViewEntry<'_, NodeType<V>>

Get the type of the current node

source

fn get<'a, T: Component + Sync + Send>(&'a self) -> Option<ViewEntry<'a, T>>

Get a component from the current node

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

source

fn child_ids(&self) -> Vec<NodeId>

Get the ids of the children of the current node

source

fn children(&self) -> Vec<NodeRef<'_, V>>

Get the children of the current node

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 parent_id(&self) -> Option<NodeId>

Get the id of the parent of the current node

source

fn parent(&self) -> Option<NodeRef<'_, V>>

Get the parent of the current node

source

fn next(&self) -> Option<NodeRef<'_, V>>

Get the node after the current node

source

fn prev(&self) -> Option<NodeRef<'_, V>>

Get the node before the current node

source

fn height(&self) -> u16

Get the height of the current node in the tree (the number of nodes between the current node and the root)

Implementors§

source§

impl<'a, V: FromAnyValue + Send + Sync> NodeImmutable<V> for NodeMut<'a, V>

source§

impl<'a, V: FromAnyValue + Send + Sync> NodeImmutable<V> for NodeRef<'a, V>