pub type DioxusDOM = RealDom<CustomAttributeValues>;
Aliased Type§
struct DioxusDOM { /* private fields */ }
Implementations
source§impl<V> RealDom<V>
impl<V> RealDom<V>
sourcepub fn new(tracked_states: impl Into<Box<[TypeErasedState<V>]>>) -> RealDom<V>
pub fn new(tracked_states: impl Into<Box<[TypeErasedState<V>]>>) -> RealDom<V>
Create a new RealDom with the given states that will be inserted and updated when needed
sourcepub fn tree_mut(&self) -> (EntitiesViewMut<'_>, ViewMut<'_, Node>)
pub fn tree_mut(&self) -> (EntitiesViewMut<'_>, ViewMut<'_, Node>)
Get a mutable reference to the tree.
sourcepub fn create_node(&mut self, node: impl Into<NodeType<V>>) -> NodeMut<'_, V>
pub fn create_node(&mut self, node: impl Into<NodeType<V>>) -> NodeMut<'_, V>
Create a new node of the given type in the dom and return a mutable reference to it.
pub fn is_node_listening(&self, node_id: &EntityId, event: &EventName) -> bool
pub fn get_listeners(&self, event: &EventName) -> Vec<NodeRef<'_, V>>
sourcepub fn get_mut(&mut self, id: EntityId) -> Option<NodeMut<'_, V>>
pub fn get_mut(&mut self, id: EntityId) -> Option<NodeMut<'_, V>>
Get a mutable reference to a node.
sourcepub fn update_state(
&mut self,
ctx: Map<dyn Any + Sync + Send>,
) -> (DashSet<EntityId, BuildHasherDefault<FxHasher>>, HashMap<EntityId, NodeMask, FxBuildHasher>)
pub fn update_state( &mut self, ctx: Map<dyn Any + Sync + Send>, ) -> (DashSet<EntityId, BuildHasherDefault<FxHasher>>, HashMap<EntityId, NodeMask, FxBuildHasher>)
Update the state of the dom, after appling some mutations. This will keep the nodes in the dom up to date with their VNode counterparts.
sourcepub fn traverse_depth_first_advanced(
&self,
f: impl FnMut(NodeRef<'_, V>) -> bool,
)
pub fn traverse_depth_first_advanced( &self, f: impl FnMut(NodeRef<'_, V>) -> bool, )
Traverses the dom in a depth first manner,
calling the provided function on each node only when the parent function returns true
.
This is useful to not traverse through text nodes for instance.
sourcepub fn traverse_depth_first(&self, f: impl FnMut(NodeRef<'_, V>))
pub fn traverse_depth_first(&self, f: impl FnMut(NodeRef<'_, V>))
Traverses the dom in a depth first manner, calling the provided function on each node.
sourcepub fn raw_world(&self) -> &World
pub fn raw_world(&self) -> &World
Returns a reference to the underlying world. Any changes made to the world will not update the reactive system.
sourcepub fn raw_world_mut(&mut self) -> &mut World
pub fn raw_world_mut(&mut self) -> &mut World
Returns a mutable reference to the underlying world. Any changes made to the world will not update the reactive system.