pub struct PlanPath {
pub chain: Vec<String>,
pub total_cost: u64,
pub fits: bool,
pub effects: BTreeSet<String>,
}Expand description
One linear chain from goal to a leaf, with its total cost and
the union of effects along it.
Fields§
§chain: Vec<String>Functions in call order — chain[0] is always goal.
total_cost: u64Sum of declared [budget(N)] for every fn in chain.
Recursive self-calls are counted once (the cycle is broken
at the second visit) — see expand_paths for the visited-set.
fits: booltrue iff total_cost <= effective_cap (whichever of
max_cost and the session-remaining is smaller). Always
true when no cap applies.
effects: BTreeSet<String>Union of effect names declared on every fn in the chain
(excluding the budget pseudo-effect, which is the cost
dimension itself).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for PlanPath
impl<'de> Deserialize<'de> for PlanPath
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
impl Eq for PlanPath
impl StructuralPartialEq for PlanPath
Auto Trait Implementations§
impl Freeze for PlanPath
impl RefUnwindSafe for PlanPath
impl Send for PlanPath
impl Sync for PlanPath
impl Unpin for PlanPath
impl UnsafeUnpin for PlanPath
impl UnwindSafe for PlanPath
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.