Type Alias freya_core::dom::doms::DioxusDOM
source · pub type DioxusDOM = RealDom<CustomAttributeValues>;
Aliased Type§
struct DioxusDOM { /* private fields */ }
Implementations
§impl<V> RealDom<V>
impl<V> RealDom<V>
pub 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
pub fn tree_ref(&self) -> View<'_, Node>
pub fn tree_ref(&self) -> View<'_, Node>
Get a reference to the tree.
pub fn tree_mut(&self) -> (EntitiesViewMut<'_>, ViewMut<'_, Node>)
pub fn tree_mut(&self) -> (EntitiesViewMut<'_>, ViewMut<'_, Node>)
Get a mutable reference to the tree.
pub 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>>
pub fn root_id(&self) -> EntityId
pub fn root_id(&self) -> EntityId
Returns the id of the root node.
pub 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.
pub 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.
pub 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.
pub 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.
pub 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.