pub enum StageOutcome {
Continue,
Complete,
NeedMoreData {
additional_beam: usize,
go_deeper: bool,
},
Backtrack {
target_stage: String,
reason: String,
},
Skip {
reason: String,
},
}Expand description
Result of a stage execution, controlling pipeline flow.
Variants§
Continue
Stage completed successfully, continue to next stage.
Complete
Entire retrieval is complete, return results.
NeedMoreData
Need more data, go back to Search stage for another iteration.
This enables incremental retrieval where the Evaluate stage can request additional search rounds if current results are insufficient.
Fields
Backtrack
Backtrack to a specific stage for re-planning.
Used when current strategy isn’t working and a different approach is needed.
Fields
Skip
Skip remaining stages and return current results.
Used when results are “good enough” or when further processing wouldn’t improve the outcome.
Implementations§
Source§impl StageOutcome
impl StageOutcome
Sourcepub fn need_more(additional_beam: usize, go_deeper: bool) -> Self
pub fn need_more(additional_beam: usize, go_deeper: bool) -> Self
Create a NeedMoreData outcome.
Sourcepub fn backtrack(target: impl Into<String>, reason: impl Into<String>) -> Self
pub fn backtrack(target: impl Into<String>, reason: impl Into<String>) -> Self
Create a Backtrack outcome.
Sourcepub fn is_complete(&self) -> bool
pub fn is_complete(&self) -> bool
Check if this outcome indicates pipeline completion.
Sourcepub fn needs_backtrack(&self) -> bool
pub fn needs_backtrack(&self) -> bool
Check if this outcome requires backtracking.
Sourcepub fn backtrack_target(&self) -> Option<&str>
pub fn backtrack_target(&self) -> Option<&str>
Get the target stage for backtracking, if any.
Trait Implementations§
Source§impl Clone for StageOutcome
impl Clone for StageOutcome
Source§fn clone(&self) -> StageOutcome
fn clone(&self) -> StageOutcome
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for StageOutcome
impl Debug for StageOutcome
Auto Trait Implementations§
impl Freeze for StageOutcome
impl RefUnwindSafe for StageOutcome
impl Send for StageOutcome
impl Sync for StageOutcome
impl Unpin for StageOutcome
impl UnsafeUnpin for StageOutcome
impl UnwindSafe for StageOutcome
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
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>
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