pub struct LayoutPlan { /* private fields */ }Expand description
A layout tree, evaluated once when it does not animate.
Implementations§
Source§impl LayoutPlan
impl LayoutPlan
Sourcepub fn new(root: &LayoutNode, canvas: (u32, u32)) -> Self
pub fn new(root: &LayoutNode, canvas: (u32, u32)) -> Self
Plans root for a canvas of (width, height) pixels.
Sourcepub fn evaluate(&self, time: MediaTime) -> Arc<EvaluatedLayout> ⓘ
pub fn evaluate(&self, time: MediaTime) -> Arc<EvaluatedLayout> ⓘ
The tree at picture time time.
Sourcepub fn is_animated(&self) -> bool
pub fn is_animated(&self) -> bool
Whether anything in the tree animates.
Sourcepub const fn root(&self) -> &LayoutNode
pub const fn root(&self) -> &LayoutNode
The model tree with pixels converted to fractions of the canvas’s shorter side.
Trait Implementations§
Source§impl Clone for LayoutPlan
impl Clone for LayoutPlan
Source§impl Debug for LayoutPlan
impl Debug for LayoutPlan
Auto Trait Implementations§
impl Forget for LayoutPlan
impl Freeze for LayoutPlanwhere
*const LayoutNode is !null: Freeze,
PhantomData<LayoutNode>: Freeze,
*const u8 is !null: Freeze,
PhantomData<(Arc<ShapesPlan>, u128)>: Freeze,
*const ArcInner<EvaluatedLayout> is !null: Freeze,
PhantomData<ArcInner<EvaluatedLayout>>: Freeze,
impl Move for LayoutPlan
impl RefUnwindSafe for LayoutPlan
impl Send for LayoutPlanwhere
BoxRaw<LayoutNode>: Send,
RawVecInner: Send,
Arc<ShapesPlan>: Send,
Arc<EvaluatedLayout>: Send,
impl Sync for LayoutPlanwhere
BoxRaw<LayoutNode>: Sync,
RawVecInner: Sync,
Arc<ShapesPlan>: Sync,
Arc<EvaluatedLayout>: Sync,
impl Unpin for LayoutPlanwhere
Box<LayoutNode>: Unpin,
*const u8 is !null: Unpin,
Arc<ShapesPlan>: Unpin,
Arc<EvaluatedLayout>: Unpin,
impl UnsafeUnpin for LayoutPlanwhere
*const LayoutNode is !null: UnsafeUnpin,
PhantomData<LayoutNode>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<(Arc<ShapesPlan>, u128)>: UnsafeUnpin,
*const ArcInner<EvaluatedLayout> is !null: UnsafeUnpin,
PhantomData<ArcInner<EvaluatedLayout>>: UnsafeUnpin,
impl UnwindSafe for LayoutPlanwhere
BoxRaw<LayoutNode>: UnwindSafe,
RawVecInner: UnwindSafe,
Arc<ShapesPlan>: UnwindSafe,
Arc<EvaluatedLayout>: 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