pub struct SegmentRoot { /* private fields */ }Expand description
Top-level holder for a segment tree (analog of ComponentList): exposes the composed commands.
Change detection uses per-segment dirty flags (shared across the hot-reload boundary) rather than
a thread-local generation, which would be duplicated per side.
Implementations§
Source§impl SegmentRoot
impl SegmentRoot
pub fn mount<C: Component + 'static>(component: C) -> Self
pub fn from_segment(root: Rc<Segment>) -> Self
pub fn generation(&self) -> u64
Sourcepub fn walk(&self, out: &mut Vec<SegmentNodeInfo>)
pub fn walk(&self, out: &mut Vec<SegmentNodeInfo>)
Emits the whole segment tree in pre-order for the devtools inspector. See Segment::walk.
Sourcepub fn is_dirty(&self) -> bool
pub fn is_dirty(&self) -> bool
Whether any segment changed since the last commands() (which clears the dirty flags).
pub fn commands(&self) -> Ref<'_, Vec<DrawCommand>>
Auto Trait Implementations§
impl !Freeze for SegmentRoot
impl !RefUnwindSafe for SegmentRoot
impl !Send for SegmentRoot
impl !Sync for SegmentRoot
impl !UnwindSafe for SegmentRoot
impl Unpin for SegmentRoot
impl UnsafeUnpin for SegmentRoot
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