Skip to main content

PlanIndexes

Struct PlanIndexes 

Source
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

Source

pub fn new() -> Self

Source

pub fn add_goal(&mut self, goal: &Goal)

Source

pub fn goal_status_changed( &mut self, id: GoalId, old: GoalStatus, new: GoalStatus, )

Source

pub fn goal_priority_changed( &mut self, id: GoalId, old: Priority, new: Priority, )

Source

pub fn goal_activated(&mut self, id: GoalId)

Source

pub fn goal_completed(&mut self, id: GoalId)

Source

pub fn goal_abandoned(&mut self, id: GoalId)

Source

pub fn goal_blocked(&mut self, id: GoalId)

Source

pub fn goal_unblocked(&mut self, id: GoalId)

Source

pub fn goal_linked(&mut self, relationship: &GoalRelationship)

Source

pub fn add_decision(&mut self, decision: &Decision)

Source

pub fn decision_crystallized(&mut self, id: DecisionId)

Source

pub fn add_commitment(&mut self, commitment: &Commitment)

Source

pub fn commitment_fulfilled(&mut self, id: CommitmentId)

Source

pub fn commitment_broken(&mut self, id: CommitmentId)

Source

pub fn remove_goal(&mut self, id: GoalId)

R1: Clean up goal relationship entries when a goal is removed

Source

pub fn remove_commitment(&mut self, id: CommitmentId)

R2: Clean up commitment entanglement entries when a commitment is removed

Source

pub fn add_dream(&mut self, dream: &Dream)

R3: Index a dream by its goal_id

Source

pub fn add_federation(&mut self, federation: &Federation)

R3: Index a federation by member agent_ids and sync_status

Source

pub fn rebuild( &mut self, goals: &HashMap<GoalId, Goal>, decisions: &HashMap<DecisionId, Decision>, commitments: &HashMap<CommitmentId, Commitment>, )

Source

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

Source§

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)

Performs copy-assignment from source. Read more
Source§

impl Debug for PlanIndexes

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for PlanIndexes

Source§

fn default() -> PlanIndexes

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for PlanIndexes

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for PlanIndexes

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.