pub struct ProposedPlan {
pub plan_id: String,
pub pack: String,
pub summary: String,
pub plan: Value,
pub confidence: f64,
pub trace_link: KernelTraceLink,
}Expand description
Proposed plan from solver
This is always a proposal (never authority) - promotion happens only at the PromotionGate.
Fields§
§plan_id: StringUnique plan identifier
pack: StringPack that generated this plan
summary: StringHuman-readable summary
plan: ValueTyped plan payload (pack-specific)
confidence: f64Calibrated confidence score (0.0 - 1.0)
trace_link: KernelTraceLinkLink to kernel trace for replay/audit
Implementations§
Source§impl ProposedPlan
impl ProposedPlan
Sourcepub fn new(
plan_id: impl Into<String>,
pack: impl Into<String>,
summary: impl Into<String>,
plan: Value,
confidence: f64,
trace_link: KernelTraceLink,
) -> Self
pub fn new( plan_id: impl Into<String>, pack: impl Into<String>, summary: impl Into<String>, plan: Value, confidence: f64, trace_link: KernelTraceLink, ) -> Self
Create a new proposed plan
Sourcepub fn from_payload<T: Serialize>(
plan_id: impl Into<String>,
pack: impl Into<String>,
summary: impl Into<String>,
payload: &T,
confidence: f64,
trace_link: KernelTraceLink,
) -> Result<Self>
pub fn from_payload<T: Serialize>( plan_id: impl Into<String>, pack: impl Into<String>, summary: impl Into<String>, payload: &T, confidence: f64, trace_link: KernelTraceLink, ) -> Result<Self>
Create a plan from a serializable payload
Sourcepub fn plan_as<T: for<'de> Deserialize<'de>>(&self) -> Result<T>
pub fn plan_as<T: for<'de> Deserialize<'de>>(&self) -> Result<T>
Deserialize plan payload to typed struct
Sourcepub fn is_high_confidence(&self) -> bool
pub fn is_high_confidence(&self) -> bool
Check if plan has high confidence (>= 0.8)
Sourcepub fn is_low_confidence(&self) -> bool
pub fn is_low_confidence(&self) -> bool
Check if plan has low confidence (< 0.5)
Trait Implementations§
Source§impl Clone for ProposedPlan
impl Clone for ProposedPlan
Source§fn clone(&self) -> ProposedPlan
fn clone(&self) -> ProposedPlan
Returns a duplicate of the value. Read more
1.0.0 · 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 ProposedPlan
impl Debug for ProposedPlan
Source§impl<'de> Deserialize<'de> for ProposedPlan
impl<'de> Deserialize<'de> for ProposedPlan
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 ProposedPlan
impl RefUnwindSafe for ProposedPlan
impl Send for ProposedPlan
impl Sync for ProposedPlan
impl Unpin for ProposedPlan
impl UnsafeUnpin for ProposedPlan
impl UnwindSafe for ProposedPlan
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