pub struct LoopState {
pub index: usize,
pub item: Option<String>,
pub accumulated_results: Vec<String>,
pub should_break: bool,
pub should_continue: bool,
}Expand description
Tracks the state of a loop during execution.
Fields§
§index: usizeCurrent iteration index (0-based).
item: Option<String>Current item (for ForEach loops — the JSON string of the current element).
accumulated_results: Vec<String>Accumulated results from each iteration.
should_break: boolWhether a break was requested.
should_continue: boolWhether the current iteration should be skipped (continue).
Implementations§
Source§impl LoopState
impl LoopState
Sourcepub fn request_break(&mut self)
pub fn request_break(&mut self)
Request a break out of the loop.
Sourcepub fn request_continue(&mut self)
pub fn request_continue(&mut self)
Request a continue (skip rest of current iteration).
Sourcepub fn push_result(&mut self, result: String)
pub fn push_result(&mut self, result: String)
Record the result of the current iteration.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for LoopState
impl<'de> Deserialize<'de> for LoopState
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 LoopState
impl RefUnwindSafe for LoopState
impl Send for LoopState
impl Sync for LoopState
impl Unpin for LoopState
impl UnsafeUnpin for LoopState
impl UnwindSafe for LoopState
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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