#[non_exhaustive]pub enum AgentLifecycleEvent {
Spawned {
agent_id: String,
parent_id: Option<String>,
model_id: String,
timestamp_ms: u64,
},
RunStart {
agent_id: String,
timestamp_ms: u64,
},
RunEnd {
agent_id: String,
timestamp_ms: u64,
success: bool,
},
Suspended {
agent_id: String,
snapshot: Box<AgentSnapshot>,
timestamp_ms: u64,
},
Resumed {
agent_id: String,
from_snapshot_id: Option<String>,
timestamp_ms: u64,
},
Terminated {
agent_id: String,
timestamp_ms: u64,
},
ModelSwitched {
agent_id: String,
from_model: String,
to_model: String,
timestamp_ms: u64,
},
}Expand description
Events emitted during agent lifecycle transitions.
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.
Spawned
An agent was spawned into the pool.
Fields
RunStart
An agent began a run.
Fields
RunEnd
An agent completed a run.
Fields
Suspended
An agent was suspended and its state snapshotted.
Fields
§
snapshot: Box<AgentSnapshot>Captured state snapshot at suspension time.
Resumed
A suspended agent resumed execution.
Fields
Terminated
An agent was permanently terminated.
Fields
ModelSwitched
An agent switched its underlying model.
Implementations§
Trait Implementations§
Source§impl Clone for AgentLifecycleEvent
impl Clone for AgentLifecycleEvent
Source§fn clone(&self) -> AgentLifecycleEvent
fn clone(&self) -> AgentLifecycleEvent
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 AgentLifecycleEvent
impl Debug for AgentLifecycleEvent
Source§impl<'de> Deserialize<'de> for AgentLifecycleEvent
impl<'de> Deserialize<'de> for AgentLifecycleEvent
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 !RefUnwindSafe for AgentLifecycleEvent
impl !UnwindSafe for AgentLifecycleEvent
impl Freeze for AgentLifecycleEvent
impl Send for AgentLifecycleEvent
impl Sync for AgentLifecycleEvent
impl Unpin for AgentLifecycleEvent
impl UnsafeUnpin for AgentLifecycleEvent
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