pub enum MultiAgentEvent {
NodeStart {
node_id: String,
node_type: String,
},
NodeStop {
node_id: String,
node_result: NodeResult,
},
Handoff {
from_node_ids: Vec<String>,
to_node_ids: Vec<String>,
message: Option<String>,
},
NodeStream {
node_id: String,
event: Value,
},
NodeCancel {
node_id: String,
message: String,
},
NodeInterrupt {
node_id: String,
interrupts: Vec<Interrupt>,
},
Result(MultiAgentResult),
}Expand description
Events emitted during multi-agent execution.
Variants§
NodeStart
A node has started execution.
NodeStop
A node has stopped execution.
Handoff
A handoff occurred between nodes.
NodeStream
Streaming event from a node.
NodeCancel
A node was cancelled.
NodeInterrupt
A node was interrupted.
Result(MultiAgentResult)
Final result.
Implementations§
Source§impl MultiAgentEvent
impl MultiAgentEvent
pub fn node_start( node_id: impl Into<String>, node_type: impl Into<String>, ) -> Self
pub fn node_stop(node_id: impl Into<String>, node_result: NodeResult) -> Self
pub fn handoff( from_node_ids: Vec<String>, to_node_ids: Vec<String>, message: Option<String>, ) -> Self
pub fn node_stream(node_id: impl Into<String>, event: Value) -> Self
pub fn node_cancel( node_id: impl Into<String>, message: impl Into<String>, ) -> Self
pub fn node_interrupt( node_id: impl Into<String>, interrupts: Vec<Interrupt>, ) -> Self
pub fn result(result: MultiAgentResult) -> Self
pub fn is_result(&self) -> bool
pub fn as_result(&self) -> Option<&MultiAgentResult>
Trait Implementations§
Source§impl Clone for MultiAgentEvent
impl Clone for MultiAgentEvent
Source§fn clone(&self) -> MultiAgentEvent
fn clone(&self) -> MultiAgentEvent
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for MultiAgentEvent
impl RefUnwindSafe for MultiAgentEvent
impl Send for MultiAgentEvent
impl Sync for MultiAgentEvent
impl Unpin for MultiAgentEvent
impl UnwindSafe for MultiAgentEvent
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> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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 moreCreates a shared type from an unshared type.