pub struct DeltaForest { /* private fields */ }Expand description
The dependents of every entry, as a forest.
Children are in ascending entry order inside child_of, which is what
makes a depth-first walk of a subtree a fixed sequence and therefore makes
the resolver’s output independent of how many workers walked it.
Implementations§
Source§impl DeltaForest
impl DeltaForest
pub fn entries(&self) -> usize
pub fn children(&self, i: u32) -> &[u32]
pub fn parent(&self, i: u32) -> u32
Sourcepub fn whole_roots(&self) -> &[u32]
pub fn whole_roots(&self) -> &[u32]
The entries that need no lookup at all to resolve.
Sourcepub fn closure_of(&self, roots: &[u32]) -> EntrySet
pub fn closure_of(&self, roots: &[u32]) -> EntrySet
Which entries a round covers, given the roots it starts from.
One forward sweep and no stack: a parent’s index is always lower than its
child’s (offsets ascend), so i is reachable exactly when its parent is,
and that is already decided by the time the sweep gets to i.
Sourcepub fn subtree_size(&self, r: u32) -> u64
pub fn subtree_size(&self, r: u32) -> u64
Total nodes in the subtree rooted at r, counting r. What a scheduler
weighs a unit by, and what a test asserts a partition against.
Auto Trait Implementations§
impl Freeze for DeltaForest
impl RefUnwindSafe for DeltaForest
impl Send for DeltaForest
impl Sync for DeltaForest
impl Unpin for DeltaForest
impl UnsafeUnpin for DeltaForest
impl UnwindSafe for DeltaForest
Blanket Implementations§
impl<T> Allocation for T
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