pub struct Torin<Key>where
Key: NodeKey,{
pub results: HashMap<Key, NodeAreas, BuildHasherDefault<FxHasher>>,
pub dirty: HashSet<Key, RandomState>,
pub root_node_candidate: RootNodeCandidate<Key>,
}
Fields§
§results: HashMap<Key, NodeAreas, BuildHasherDefault<FxHasher>>
Layout results of the registered Nodes
dirty: HashSet<Key, RandomState>
Invalid registered nodes since previous layout measurement
root_node_candidate: RootNodeCandidate<Key>
Best Root node candidate from where to start measuring
Implementations§
§impl Torin<EntityId>
impl Torin<EntityId>
pub fn apply_mutations( &mut self, mutations: &Mutations<'_>, dioxus_integration_state: &DioxusState, dom_adapter: &impl DOMAdapter<EntityId> )
§impl<Key> Torin<Key>where
Key: NodeKey,
impl<Key> Torin<Key>where Key: NodeKey,
pub fn reset(&mut self)
pub fn reset(&mut self)
Reset the layout
pub fn get_dirty_nodes(&self) -> &HashSet<Key, RandomState>
pub fn get_dirty_nodes(&self) -> &HashSet<Key, RandomState>
Read the HashSet of dirty nodes
pub fn raw_remove(&mut self, node_id: Key)
pub fn raw_remove(&mut self, node_id: Key)
Remove a Node’s result and data
pub fn remove(
&mut self,
node_id: Key,
dom_adapter: &impl DOMAdapter<Key>,
invalidate_parent: bool
)
pub fn remove( &mut self, node_id: Key, dom_adapter: &impl DOMAdapter<Key>, invalidate_parent: bool )
Remove a Node from the layout
pub fn invalidate(&mut self, node_id: Key)
pub fn invalidate(&mut self, node_id: Key)
Mark as dirty a Node
pub fn safe_invalidate( &mut self, node_id: Key, dom_adapter: &impl DOMAdapter<Key> )
pub fn check_dirty_dependants( &mut self, node_id: Key, dom_adapter: &impl DOMAdapter<Key>, ignore: bool )
pub fn get_root_candidate(&self) -> RootNodeCandidate<Key>
pub fn get_root_candidate(&self) -> RootNodeCandidate<Key>
Get the Root Node candidate
pub fn find_best_root(&mut self, dom_adapter: &impl DOMAdapter<Key>)
pub fn find_best_root(&mut self, dom_adapter: &impl DOMAdapter<Key>)
Find the best root Node from where to start measuring
pub fn measure(
&mut self,
suggested_root_id: Key,
suggested_root_area: Rect<f32, Measure>,
measurer: &mut Option<impl LayoutMeasurer<Key>>,
dom_adapter: &impl DOMAdapter<Key>
)
pub fn measure( &mut self, suggested_root_id: Key, suggested_root_area: Rect<f32, Measure>, measurer: &mut Option<impl LayoutMeasurer<Key>>, dom_adapter: &impl DOMAdapter<Key> )
Measure dirty Nodes
pub fn cache_node(&mut self, node_id: Key, areas: NodeAreas)
pub fn cache_node(&mut self, node_id: Key, areas: NodeAreas)
Cache a Node’s areas
Trait Implementations§
Auto Trait Implementations§
impl<Key> RefUnwindSafe for Torin<Key>where Key: RefUnwindSafe,
impl<Key> Send for Torin<Key>where Key: Send,
impl<Key> Sync for Torin<Key>where Key: Sync,
impl<Key> Unpin for Torin<Key>where Key: Unpin,
impl<Key> UnwindSafe for Torin<Key>where Key: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere T: Default,
type NoneType = T
§fn null_value() -> T
fn null_value() -> T
The none-equivalent value.