pub struct Scheduler {
pub focused: Option<u64>,
pub size: (u32, u32),
/* private fields */
}Fields§
§focused: Option<u64>§size: (u32, u32)Implementations§
Source§impl Scheduler
impl Scheduler
pub fn new() -> Self
Sourcepub fn enter_scope(&mut self, key: &str)
pub fn enter_scope(&mut self, key: &str)
Enter a named scope. Subsequent id() calls within this scope
will allocate from the scope’s local counter, producing packed
(scope_id << 32) | local_id values that are stable across sibling
recompositions.
Sourcepub fn exit_scope(&mut self)
pub fn exit_scope(&mut self)
Exit the current scope. Subsequent id() calls return global IDs again.
pub fn id(&mut self) -> u64
pub fn id_count(&self) -> u64
Sourcepub fn snapshot_id(&self) -> u64
pub fn snapshot_id(&self) -> u64
Snapshot the current ID counter (before executing a scope body) so the delta can be computed after the body returns.
Sourcepub fn advance_id(&mut self, count: u32)
pub fn advance_id(&mut self, count: u32)
Advance the ID counter by count without assigning IDs.
Used by the scope! macro to reserve IDs for a cached scope subtree.
Sourcepub fn ids_used_since(&self, prev_id: u64) -> u32
pub fn ids_used_since(&self, prev_id: u64) -> u32
Number of IDs assigned since prev_id (the value returned by
snapshot_id() before executing a scope body).
pub fn repose<F>( &mut self, build_root: F, layout_paint: impl Fn(&View, (u32, u32)) -> (Scene, Vec<HitRegion>, Vec<SemNode>), ) -> Frame
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Scheduler
impl RefUnwindSafe for Scheduler
impl Send for Scheduler
impl Sync for Scheduler
impl Unpin for Scheduler
impl UnsafeUnpin for Scheduler
impl UnwindSafe for Scheduler
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