pub struct Forest {
pub roots: Vec<usize>,
pub children: Vec<Vec<usize>>,
pub unreachable: Vec<usize>,
}Expand description
Parent/child forest over a set of items, classified by membership in that set.
The input is assumed to already be in canonical backlog order
(BacklogItem::backlog_cmp); this type preserves that order so roots and
siblings stay rank-ordered.
Fields§
§roots: Vec<usize>Root item indices (no parent, parent outside the set, or self-parent), in input order.
children: Vec<Vec<usize>>Direct children per item index (by input order); empty slice when none.
unreachable: Vec<usize>Indices unreachable from any root (parent-link cycles), in input order.
Auto Trait Implementations§
impl Freeze for Forest
impl RefUnwindSafe for Forest
impl Send for Forest
impl Sync for Forest
impl Unpin for Forest
impl UnsafeUnpin for Forest
impl UnwindSafe for Forest
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more