pub struct Engine { /* private fields */ }Expand description
One tree of slots; several roots (the main tree, every overlay layer).
Implementations§
Source§impl Engine
impl Engine
pub fn new() -> Engine
Sourcepub fn set_rounding(&mut self, on: bool)
pub fn set_rounding(&mut self, on: bool)
Off = fractional frames (the default).
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn clear(&mut self)
Sourcepub fn set_style(&mut self, i: u32, style: Style) -> bool
pub fn set_style(&mut self, i: u32, style: Style) -> bool
Replace a slot’s style; its cache and its ancestors’ are cleared when the style differs.
pub fn style(&self, i: u32) -> &Style
Sourcepub fn set_children(&mut self, i: u32, children: &[u32])
pub fn set_children(&mut self, i: u32, children: &[u32])
Set a slot’s children (parent pointers follow); dirty when changed.
pub fn children(&self, i: u32) -> &[u32]
pub fn set_measured(&mut self, i: u32, measured: bool)
Sourcepub fn mark_dirty(&mut self, i: u32)
pub fn mark_dirty(&mut self, i: u32)
Forget the cached layout of i and every ancestor.
pub fn mark_all_dirty(&mut self)
Trait Implementations§
Auto Trait Implementations§
impl !Send for Engine
impl !Sync for Engine
impl Freeze for Engine
impl RefUnwindSafe for Engine
impl Unpin for Engine
impl UnsafeUnpin for Engine
impl UnwindSafe for Engine
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