pub struct IterationContext {
pub iteration: usize,
pub max_iterations: usize,
pub previous_code: Option<String>,
pub previous_errors: Vec<String>,
pub feedback: Vec<String>,
}Expand description
Iteration context for retry with error feedback.
Fields§
§iteration: usizeCurrent iteration number (1-based)
max_iterations: usizeMaximum iterations allowed
previous_code: Option<String>Previous generated code
previous_errors: Vec<String>Previous errors
feedback: Vec<String>Accumulated feedback
Implementations§
Source§impl IterationContext
impl IterationContext
Sourcepub fn record_failure(&mut self, code: &str, errors: Vec<String>)
pub fn record_failure(&mut self, code: &str, errors: Vec<String>)
Record a failed iteration.
Sourcepub fn get_feedback(&self) -> String
pub fn get_feedback(&self) -> String
Get formatted feedback for next iteration.
Trait Implementations§
Source§impl Clone for IterationContext
impl Clone for IterationContext
Source§fn clone(&self) -> IterationContext
fn clone(&self) -> IterationContext
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 IterationContext
impl Debug for IterationContext
Source§impl<'de> Deserialize<'de> for IterationContext
impl<'de> Deserialize<'de> for IterationContext
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 IterationContext
impl RefUnwindSafe for IterationContext
impl Send for IterationContext
impl Sync for IterationContext
impl Unpin for IterationContext
impl UnsafeUnpin for IterationContext
impl UnwindSafe for IterationContext
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