#[non_exhaustive]pub enum SwarmFailure {
Agent {
agent: String,
source: Box<PromptError>,
},
Timeout {
agent: String,
},
MaxHandoffs {
limit: usize,
},
Checkpoint {
error: CheckpointError,
},
Repetitive {
window: usize,
unique: usize,
},
}Expand description
Why a swarm run stopped without an answer.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Agent
An agent’s run failed.
Timeout
An agent’s turn, or the whole run, ran out of time.
MaxHandoffs
The agents handed off more times than SwarmBuilder::max_handoffs.
Checkpoint
The checkpoint could not be read or written.
Fields
§
error: CheckpointErrorWhat went wrong.
Repetitive
The work kept bouncing among a few agents; see
SwarmBuilder::detect_repetition.
Trait Implementations§
Source§impl Debug for SwarmFailure
impl Debug for SwarmFailure
Source§impl Display for SwarmFailure
impl Display for SwarmFailure
Source§impl Error for SwarmFailure
impl Error for SwarmFailure
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl !RefUnwindSafe for SwarmFailure
impl !UnwindSafe for SwarmFailure
impl Forget for SwarmFailure
impl Freeze for SwarmFailure
impl Move for SwarmFailure
impl Send for SwarmFailure
impl Sync for SwarmFailure
impl Unpin for SwarmFailure
impl UnsafeUnpin for SwarmFailure
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