Struct pax_core::runtime::StackFrame
source · pub struct StackFrame<R: 'static + RenderContext> { /* private fields */ }Expand description
Data structure for a single frame of our runtime stack, including
a reference to its parent frame, a list of adoptees for
prospective [Slot] consumption, and properties for
runtime evaluation, e.g. of Expressions. StackFrames also track
timeline playhead position.
Components push StackFrames when mounting and pop them when unmounting, thus providing a
hierarchical store of node-relevant data that can be bound to symbols, e.g. in expressions.
Note that RepeatItems also push StackFrames, because RepeatItem uses a Component internally.
Implementations§
source§impl<R: 'static + RenderContext> StackFrame<R>
impl<R: 'static + RenderContext> StackFrame<R>
pub fn new( adoptees: RenderNodePtrList<R>, properties: Rc<RefCell<PropertiesCoproduct>>, parent: Option<Weak<RefCell<StackFrame<R>>>>, timeline: Option<Rc<RefCell<Timeline>>> ) -> Self
pub fn get_timeline_playhead_position(&self) -> usize
pub fn peek_nth(&self, n: isize) -> Option<Rc<RefCell<StackFrame<R>>>>
pub fn get_properties(&self) -> Rc<RefCell<PropertiesCoproduct>>
pub fn get_unflattened_adoptees(&self) -> RenderNodePtrList<R>
pub fn nth_adoptee(&self, n: usize) -> Option<RenderNodePtr<R>>
pub fn has_adoptees(&self) -> bool
Auto Trait Implementations§
impl<R> !RefUnwindSafe for StackFrame<R>
impl<R> !Send for StackFrame<R>
impl<R> !Sync for StackFrame<R>
impl<R> Unpin for StackFrame<R>
impl<R> !UnwindSafe for StackFrame<R>
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, U> RoundInto<U> for Twhere
U: RoundFrom<T>,
impl<T, U> RoundInto<U> for Twhere U: RoundFrom<T>,
source§fn round_into(self) -> U
fn round_into(self) -> U
Performs the conversion.