pub struct PlanIndexes {Show 24 fields
pub goals_by_status: HashMap<GoalStatus, Vec<GoalId>>,
pub goals_by_priority: HashMap<Priority, Vec<GoalId>>,
pub goals_by_deadline: BTreeMap<Timestamp, Vec<GoalId>>,
pub goals_by_parent: HashMap<GoalId, Vec<GoalId>>,
pub root_goals: Vec<GoalId>,
pub active_goals: Vec<GoalId>,
pub blocked_goals: Vec<GoalId>,
pub goals_by_tag: HashMap<String, Vec<GoalId>>,
pub decisions_by_goal: HashMap<GoalId, Vec<DecisionId>>,
pub decisions_by_time: BTreeMap<Timestamp, Vec<DecisionId>>,
pub pending_decisions: Vec<DecisionId>,
pub regretted_decisions: Vec<DecisionId>,
pub decision_chains: HashMap<DecisionId, Vec<DecisionId>>,
pub commitments_by_due: BTreeMap<Timestamp, Vec<CommitmentId>>,
pub commitments_by_stakeholder: HashMap<StakeholderId, Vec<CommitmentId>>,
pub commitments_by_goal: HashMap<GoalId, Vec<CommitmentId>>,
pub active_commitments: Vec<CommitmentId>,
pub at_risk_commitments: Vec<CommitmentId>,
pub urgent_items: Vec<UrgentItem>,
pub goal_relationships: HashMap<GoalId, Vec<(GoalId, GoalRelationship)>>,
pub commitment_entanglements: HashMap<CommitmentId, Vec<CommitmentId>>,
pub dreams_by_goal: HashMap<GoalId, Vec<DreamId>>,
pub federations_by_member: HashMap<String, Vec<FederationId>>,
pub federations_by_sync: HashMap<SyncStatus, Vec<FederationId>>,
}Fields§
§goals_by_status: HashMap<GoalStatus, Vec<GoalId>>§goals_by_priority: HashMap<Priority, Vec<GoalId>>§goals_by_deadline: BTreeMap<Timestamp, Vec<GoalId>>§goals_by_parent: HashMap<GoalId, Vec<GoalId>>§root_goals: Vec<GoalId>§active_goals: Vec<GoalId>§blocked_goals: Vec<GoalId>§goals_by_tag: HashMap<String, Vec<GoalId>>§decisions_by_goal: HashMap<GoalId, Vec<DecisionId>>§decisions_by_time: BTreeMap<Timestamp, Vec<DecisionId>>§pending_decisions: Vec<DecisionId>§regretted_decisions: Vec<DecisionId>§decision_chains: HashMap<DecisionId, Vec<DecisionId>>§commitments_by_due: BTreeMap<Timestamp, Vec<CommitmentId>>§commitments_by_stakeholder: HashMap<StakeholderId, Vec<CommitmentId>>§commitments_by_goal: HashMap<GoalId, Vec<CommitmentId>>§active_commitments: Vec<CommitmentId>§at_risk_commitments: Vec<CommitmentId>§urgent_items: Vec<UrgentItem>§goal_relationships: HashMap<GoalId, Vec<(GoalId, GoalRelationship)>>§commitment_entanglements: HashMap<CommitmentId, Vec<CommitmentId>>§dreams_by_goal: HashMap<GoalId, Vec<DreamId>>§federations_by_member: HashMap<String, Vec<FederationId>>§federations_by_sync: HashMap<SyncStatus, Vec<FederationId>>Implementations§
Source§impl PlanIndexes
impl PlanIndexes
pub fn new() -> Self
pub fn add_goal(&mut self, goal: &Goal)
pub fn goal_status_changed( &mut self, id: GoalId, old: GoalStatus, new: GoalStatus, )
pub fn goal_priority_changed( &mut self, id: GoalId, old: Priority, new: Priority, )
pub fn goal_activated(&mut self, id: GoalId)
pub fn goal_completed(&mut self, id: GoalId)
pub fn goal_abandoned(&mut self, id: GoalId)
pub fn goal_blocked(&mut self, id: GoalId)
pub fn goal_unblocked(&mut self, id: GoalId)
pub fn goal_linked(&mut self, relationship: &GoalRelationship)
pub fn add_decision(&mut self, decision: &Decision)
pub fn decision_crystallized(&mut self, id: DecisionId)
pub fn add_commitment(&mut self, commitment: &Commitment)
pub fn commitment_fulfilled(&mut self, id: CommitmentId)
pub fn commitment_broken(&mut self, id: CommitmentId)
Sourcepub fn remove_goal(&mut self, id: GoalId)
pub fn remove_goal(&mut self, id: GoalId)
R1: Clean up goal relationship entries when a goal is removed
Sourcepub fn remove_commitment(&mut self, id: CommitmentId)
pub fn remove_commitment(&mut self, id: CommitmentId)
R2: Clean up commitment entanglement entries when a commitment is removed
Sourcepub fn add_federation(&mut self, federation: &Federation)
pub fn add_federation(&mut self, federation: &Federation)
R3: Index a federation by member agent_ids and sync_status
pub fn rebuild( &mut self, goals: &HashMap<GoalId, Goal>, decisions: &HashMap<DecisionId, Decision>, commitments: &HashMap<CommitmentId, Commitment>, )
Sourcepub fn rebuild_full(
&mut self,
goals: &HashMap<GoalId, Goal>,
decisions: &HashMap<DecisionId, Decision>,
commitments: &HashMap<CommitmentId, Commitment>,
dreams: &HashMap<DreamId, Dream>,
federations: &HashMap<FederationId, Federation>,
)
pub fn rebuild_full( &mut self, goals: &HashMap<GoalId, Goal>, decisions: &HashMap<DecisionId, Decision>, commitments: &HashMap<CommitmentId, Commitment>, dreams: &HashMap<DreamId, Dream>, federations: &HashMap<FederationId, Federation>, )
R3: Full rebuild including dreams and federations
Trait Implementations§
Source§impl Clone for PlanIndexes
impl Clone for PlanIndexes
Source§fn clone(&self) -> PlanIndexes
fn clone(&self) -> PlanIndexes
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PlanIndexes
impl Debug for PlanIndexes
Source§impl Default for PlanIndexes
impl Default for PlanIndexes
Source§fn default() -> PlanIndexes
fn default() -> PlanIndexes
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for PlanIndexes
impl<'de> Deserialize<'de> for PlanIndexes
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 PlanIndexes
impl RefUnwindSafe for PlanIndexes
impl Send for PlanIndexes
impl Sync for PlanIndexes
impl Unpin for PlanIndexes
impl UnsafeUnpin for PlanIndexes
impl UnwindSafe for PlanIndexes
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