#[non_exhaustive]pub enum EffectResult {
Llm(LlmResponse),
Tool {
output: Value,
is_error: bool,
},
Graph(Value),
Node(Value),
Slept,
Custom(Value),
Failed {
message: String,
},
}Expand description
What came back from performing an effect.
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.
Llm(LlmResponse)
A model’s reply to Effect::Llm.
Tool
A tool’s output, or its error text.
Fields
Graph(Value)
The output of the sub-graph run requested by Effect::Graph.
Node(Value)
What a node spawned by crate::step::Transition::Spawn produced.
Slept
The sleep elapsed — or was replayed from the journal, and nobody slept.
Custom(Value)
Whatever a host-supplied handler returned for Effect::Custom.
Failed
The effect could not be performed. Handed to the step rather than raised, so it can retry, fall back, or give up deliberately.
Implementations§
Trait Implementations§
Source§impl Clone for EffectResult
impl Clone for EffectResult
Source§fn clone(&self) -> EffectResult
fn clone(&self) -> EffectResult
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 EffectResult
impl Debug for EffectResult
Source§impl<'de> Deserialize<'de> for EffectResult
impl<'de> Deserialize<'de> for EffectResult
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 EffectResult
impl RefUnwindSafe for EffectResult
impl Send for EffectResult
impl Sync for EffectResult
impl Unpin for EffectResult
impl UnsafeUnpin for EffectResult
impl UnwindSafe for EffectResult
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