pub enum Event {
Show 13 variants
SessionAttached {
session_id: SessionId,
role: Role,
},
SessionDetached {
session_id: SessionId,
},
TaskCreated {
task_id: TaskId,
},
TaskAttemptStarted {
task_id: TaskId,
attempt: u32,
},
TaskAttemptCompleted {
task_id: TaskId,
attempt: u32,
result: Value,
},
TaskPass {
task_id: TaskId,
result: Value,
},
TaskBlocked {
task_id: TaskId,
result: Value,
},
WorkerOutput {
task_id: TaskId,
attempt: u32,
event: OutputEvent,
},
TaskSuspended {
task_id: TaskId,
key: ResumeKey,
},
TaskResumed {
task_id: TaskId,
key: ResumeKey,
},
TaskCancelled {
task_id: TaskId,
},
SeniorQueried {
task_id: TaskId,
question: Value,
},
SeniorAnswered {
task_id: TaskId,
answer: Value,
},
}Expand description
Engine lifecycle event. Every event is both appended to
EngineState.event_log_tail (in-process ring buffer) and broadcast on
Engine::event_tx for live subscribers.
Variants§
SessionAttached
A session was attached (attach / attach_with / attach_with_ids).
SessionDetached
A session was detached (detach, or a heartbeat-miss timeout).
TaskCreated
A new task was created via start_task.
TaskAttemptStarted
An attempt began dispatching (not currently emitted by
dispatch_attempt_with; reserved for future use).
TaskAttemptCompleted
An attempt finished, Pass or Blocked, with the resulting value.
Fields
TaskPass
The task attempt completed with ok = true.
TaskBlocked
The task attempt completed with ok = false.
WorkerOutput
A worker appended an OutputEvent via submit_output.
Fields
event: OutputEventThe appended output event.
TaskSuspended
The task suspended pending a resume for key.
TaskResumed
The task resumed after resume(key, ..) was called.
TaskCancelled
The task was cancelled via cancel_task.
SeniorQueried
query_senior was called, asking question on behalf of task_id.
Fields
SeniorAnswered
A Senior’s answer was stored via resume.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Event
impl<'de> Deserialize<'de> for Event
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>,
Auto Trait Implementations§
impl Freeze for Event
impl RefUnwindSafe for Event
impl Send for Event
impl Sync for Event
impl Unpin for Event
impl UnsafeUnpin for Event
impl UnwindSafe for Event
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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