pub struct BuildScope { /* private fields */ }Expand description
A class that determines the scope of a BuildOwner::build_scope operation.
The BuildOwner::build_scope method rebuilds all dirty Elements who share the same
BuildScope with its context argument, and skips those with a different
Element::build_scope.
Elements by default have the same BuildScope as their parents. Special Elements
may override Element::build_scope to create an isolated build scope for its descendants.
The LayoutBuilder widget, for example, establishes its own BuildScope such that no
descendant Elements may rebuild prematurely until the incoming constraints are known.
Implementations§
Source§impl BuildScope
impl BuildScope
Sourcepub fn new(app: &mut App, schedule_rebuild: Option<Listener>) -> Ref<BuildScope>
pub fn new(app: &mut App, schedule_rebuild: Option<Listener>) -> Ref<BuildScope>
Creates a BuildScope with an optional schedule_rebuild callback.
Sourcepub fn dirty_elements(self: Handle<Self>, app: &App) -> &[AnyElement]
pub fn dirty_elements(self: Handle<Self>, app: &App) -> &[AnyElement]
The elements marked dirty in this scope, in scheduling order.
Auto Trait Implementations§
impl !RefUnwindSafe for BuildScope
impl !Send for BuildScope
impl !Sync for BuildScope
impl !UnwindSafe for BuildScope
impl Forget for BuildScope
impl Freeze for BuildScope
impl Move for BuildScope
impl Unpin for BuildScope
impl UnsafeUnpin for BuildScopewhere
*const RcInner<dyn Fn(&mut App)> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Fn(&mut App)>>: UnsafeUnpin,
NonZeroU32Inner: UnsafeUnpin,
*const (): UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<AnyElement>: UnsafeUnpin,
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