pub struct LayoutEngine { /* private fields */ }Implementations§
Source§impl LayoutEngine
impl LayoutEngine
pub fn new() -> Self
pub fn set_root(&mut self, id: NodeId)
pub fn create_node( &mut self, id: NodeId, style: &LayoutStyle, ) -> Result<(), LayoutError>
pub fn update_style( &mut self, id: NodeId, style: &LayoutStyle, ) -> Result<(), LayoutError>
pub fn remove_node(&mut self, id: NodeId)
Sourcepub fn set_children_from_tree(
&mut self,
parent_id: NodeId,
tree: &ShadowTree,
) -> Result<(), LayoutError>
pub fn set_children_from_tree( &mut self, parent_id: NodeId, tree: &ShadowTree, ) -> Result<(), LayoutError>
Sync children from the shadow tree to the Taffy tree.
Sourcepub fn compute(
&mut self,
tree: &ShadowTree,
screen_width: f32,
screen_height: f32,
platform: &dyn PlatformBridge,
) -> Result<(), LayoutError>
pub fn compute( &mut self, tree: &ShadowTree, screen_width: f32, screen_height: f32, platform: &dyn PlatformBridge, ) -> Result<(), LayoutError>
Compute layout for the entire tree.
Sourcepub fn get_computed(&self, id: NodeId) -> Option<&ComputedLayout>
pub fn get_computed(&self, id: NodeId) -> Option<&ComputedLayout>
Get computed layout for a node.
Auto Trait Implementations§
impl Freeze for LayoutEngine
impl RefUnwindSafe for LayoutEngine
impl Send for LayoutEngine
impl Sync for LayoutEngine
impl Unpin for LayoutEngine
impl UnsafeUnpin for LayoutEngine
impl UnwindSafe for LayoutEngine
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