pub enum LoopCondition {
MaxIterations(usize),
OutputMatches(Box<dyn Fn(&str) -> bool + Send + Sync>),
OutputContains(String),
Either {
max_iterations: usize,
predicate: Box<dyn Fn(&str) -> bool + Send + Sync>,
},
}Expand description
Loop exit condition
Variants§
MaxIterations(usize)
Fixed number of iterations
OutputMatches(Box<dyn Fn(&str) -> bool + Send + Sync>)
Output matches predicate
OutputContains(String)
Output contains string
Either
Combined: max iterations OR output matches
Implementations§
Source§impl LoopCondition
impl LoopCondition
Auto Trait Implementations§
impl Freeze for LoopCondition
impl !RefUnwindSafe for LoopCondition
impl Send for LoopCondition
impl Sync for LoopCondition
impl Unpin for LoopCondition
impl UnsafeUnpin for LoopCondition
impl !UnwindSafe for LoopCondition
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