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§
Provided Methods§
Sourcefn get<'a, T: Component + Sync + Send>(&'a self) -> Option<ViewEntry<'a, T>>
fn get<'a, T: Component + Sync + Send>(&'a self) -> Option<ViewEntry<'a, T>>
Get a component from the current node
Sourcefn children_ids_advanced(
&self,
id: NodeId,
enter_shadow_dom: bool,
) -> Vec<NodeId>
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
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.