pub struct GoalTree {
pub goals: Vec<Goal>,
}Expand description
A tree of goals with parent-child traversal.
Fields§
§goals: Vec<Goal>All goals in the tree (flat storage, linked by parent_goal).
Implementations§
Source§impl GoalTree
impl GoalTree
Sourcepub fn children(&self, parent_id: &str) -> Vec<&Goal>
pub fn children(&self, parent_id: &str) -> Vec<&Goal>
Return all direct children of the given goal.
Sourcepub fn descendants(&self, parent_id: &str) -> Vec<&Goal>
pub fn descendants(&self, parent_id: &str) -> Vec<&Goal>
Return all descendants of the given goal (depth-first).
Sourcepub fn by_status(&self, status: GoalStatus) -> Vec<&Goal>
pub fn by_status(&self, status: GoalStatus) -> Vec<&Goal>
Return goals filtered by status.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for GoalTree
impl<'de> Deserialize<'de> for GoalTree
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for GoalTree
impl RefUnwindSafe for GoalTree
impl Send for GoalTree
impl Sync for GoalTree
impl Unpin for GoalTree
impl UnsafeUnpin for GoalTree
impl UnwindSafe for GoalTree
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