pub struct CapturedProcedure {
pub id: String,
pub title: String,
pub description: String,
pub steps: Vec<ProcedureStep>,
pub confidence: ProcedureConfidence,
pub tags: Vec<String>,
pub created_at: String,
pub updated_at: String,
pub source_session: Option<String>,
pub disabled: bool,
}Expand description
A captured procedure with ordered steps and execution history.
Fields§
§id: StringUnique identifier (UUID)
title: StringHuman-readable title
description: StringDescription of what this procedure does
steps: Vec<ProcedureStep>Ordered steps to execute
confidence: ProcedureConfidenceConfidence metrics
Tags for categorization
created_at: StringCreation timestamp (ISO 8601)
updated_at: StringLast update timestamp (ISO 8601)
source_session: Option<String>Source session ID if captured from a session
disabled: boolWhether this procedure has been disabled (e.g., by auto-healing)
Implementations§
Source§impl CapturedProcedure
impl CapturedProcedure
Sourcepub fn new(id: String, title: String, description: String) -> CapturedProcedure
pub fn new(id: String, title: String, description: String) -> CapturedProcedure
Create a new captured procedure.
Sourcepub fn add_step(&mut self, step: ProcedureStep)
pub fn add_step(&mut self, step: ProcedureStep)
Add a step to the procedure.
Sourcepub fn add_steps(&mut self, steps: Vec<ProcedureStep>)
pub fn add_steps(&mut self, steps: Vec<ProcedureStep>)
Add multiple steps to the procedure.
Sourcepub fn with_source_session(self, session_id: String) -> CapturedProcedure
pub fn with_source_session(self, session_id: String) -> CapturedProcedure
Set the source session ID.
Add tags.
Sourcepub fn with_confidence(
self,
confidence: ProcedureConfidence,
) -> CapturedProcedure
pub fn with_confidence( self, confidence: ProcedureConfidence, ) -> CapturedProcedure
Set the confidence metrics.
Sourcepub fn record_success(&mut self)
pub fn record_success(&mut self)
Record a successful execution.
Sourcepub fn record_failure(&mut self)
pub fn record_failure(&mut self)
Record a failed execution.
Sourcepub fn step_count(&self) -> usize
pub fn step_count(&self) -> usize
Get the number of steps.
Sourcepub fn merge_steps(&mut self, other: &CapturedProcedure)
pub fn merge_steps(&mut self, other: &CapturedProcedure)
Merge steps from another procedure into this one.
This is used for deduplication - when a similar procedure is found, we can merge the steps to consolidate knowledge.
Trait Implementations§
Source§impl Clone for CapturedProcedure
impl Clone for CapturedProcedure
Source§fn clone(&self) -> CapturedProcedure
fn clone(&self) -> CapturedProcedure
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CapturedProcedure
impl Debug for CapturedProcedure
Source§impl<'de> Deserialize<'de> for CapturedProcedure
impl<'de> Deserialize<'de> for CapturedProcedure
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<CapturedProcedure, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<CapturedProcedure, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for CapturedProcedure
impl Serialize for CapturedProcedure
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Auto Trait Implementations§
impl Freeze for CapturedProcedure
impl RefUnwindSafe for CapturedProcedure
impl Send for CapturedProcedure
impl Sync for CapturedProcedure
impl Unpin for CapturedProcedure
impl UnsafeUnpin for CapturedProcedure
impl UnwindSafe for CapturedProcedure
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
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<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more