pub enum RunEvent {
Show 17 variants
RunStarted {
run_id: String,
drone_id: String,
},
BlockStarted {
run_id: String,
block_id: String,
},
BlockDone {
run_id: String,
block_id: String,
output: Value,
},
BlockError {
run_id: String,
block_id: String,
error: String,
},
RunDone {
run_id: String,
output: Value,
},
RunFailed {
run_id: String,
error: String,
},
Resumed {
run_id: String,
step: u32,
},
NeedsAttention {
run_id: String,
block_id: String,
reason: String,
},
Waiting {
run_id: String,
block_id: String,
resume_at: Option<i64>,
on: Option<String>,
key: Option<String>,
},
ChildStarted {
run_id: String,
block_id: String,
child_run_id: String,
drone_id: String,
version: i64,
},
ChildEnded {
run_id: String,
block_id: String,
child_run_id: String,
status: String,
cost_usd: f64,
},
WaitEnded {
run_id: String,
block_id: String,
late: bool,
},
AttentionAnswered {
run_id: String,
block_id: String,
choice: String,
},
StepCheckpointed {
run_id: String,
step: u32,
block_id: Option<String>,
},
LoopIteration {
run_id: String,
block_id: String,
iteration: u32,
},
CapReached {
run_id: String,
block_id: String,
reason: String,
},
RunCancelled {
run_id: String,
reason: String,
},
}Expand description
Streaming events emitted to the frontend during a run.
Variants§
RunStarted
BlockStarted
BlockDone
BlockError
RunDone
RunFailed
Resumed
The run was taken up again after AgentMux restarted, from checkpoint
step: the blocks before it are not run again.
NeedsAttention
A step that may already have done its work before the restart was found
running: the run waits, needs_attention, for it to be run again, skipped
(with an output) or the run cancelled (resolvedronerun).
Waiting
The run stopped at a Wait block and holds no process while it waits.
resume_at is the time it goes on (milliseconds since 1970); on and
key are for a wait on an event: what it is for, and the key that ends it
(resumedronewait). A restart sends it again for the wait it took up.
Fields
ChildStarted
A Drone block started the drone drone_id (saved version version, 0 when
it was never saved) as a child run. Its own events are not sent here.
ChildEnded
The child run ended: status is done, failed or cancelled; cost_usd
is what it spent, which counts against the caller.
WaitEnded
The wait at block_id is over; late when the run was taken up after its time.
AttentionAnswered
The run’s wait was answered: choice is run_again or skip. (A run that
is cancelled ends with RunCancelled.)
StepCheckpointed
The run’s state was kept as checkpoint step (0 is the start, before any
block); block_id is the block it follows.
LoopIteration
A loop’s guard sent the run round again: iteration is the pass that is
starting (the first pass has no event).
CapReached
A limit (a loop’s iterations, cost or time, a for-each’s items, the run’s
dollar cap) stopped something; block_id is the block it was met at.
The run may go on (on_cap: exit_loop) or end, as the reason says.
RunCancelled
The run was stopped on purpose (cancel_run): a person, an agent, the
job’s timeout or the job’s next run. reason says which, in plain words.
Trait Implementations§
Source§impl Serialize for RunEvent
impl Serialize for RunEvent
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Source§impl TS for RunEvent
impl TS for RunEvent
Source§type WithoutGenerics = RunEvent
type WithoutGenerics = RunEvent
WithoutGenerics should just be Self.
If the type does have generic parameters, then all generic parameters must be replaced with
a dummy type, e.g ts_rs::Dummy or (). The only requirement for these dummy types is that
EXPORT_TO must be None. Read moreSource§type OptionInnerType = RunEvent
type OptionInnerType = RunEvent
std::option::Option<T>, then this associated type is set to T.
All other implementations of TS should set this type to Self instead.Source§fn docs() -> Option<String>
fn docs() -> Option<String>
TS is derived, docs are
automatically read from your doc comments or #[doc = ".."] attributesSource§fn decl_concrete(cfg: &Config) -> String
fn decl_concrete(cfg: &Config) -> String
TS::decl().
If this type is not generic, then this function is equivalent to TS::decl().Source§fn decl(cfg: &Config) -> String
fn decl(cfg: &Config) -> String
type User = { user_id: number, ... }.
This function will panic if the type has no declaration. Read moreSource§fn inline(cfg: &Config) -> String
fn inline(cfg: &Config) -> String
{ user_id: number }.
This function will panic if the type cannot be inlined.Source§fn inline_flattened(cfg: &Config) -> String
fn inline_flattened(cfg: &Config) -> String
Source§fn visit_generics(v: &mut impl TypeVisitor)where
RunEvent: 'static,
fn visit_generics(v: &mut impl TypeVisitor)where
RunEvent: 'static,
Source§fn output_path() -> Option<PathBuf>
fn output_path() -> Option<PathBuf>
T should be exported, relative to the output directory.
The returned path does not include any base directory. Read moreSource§fn visit_dependencies(v: &mut impl TypeVisitor)where
RunEvent: 'static,
fn visit_dependencies(v: &mut impl TypeVisitor)where
RunEvent: 'static,
§fn dependencies(cfg: &Config) -> Vec<Dependency>where
Self: 'static,
fn dependencies(cfg: &Config) -> Vec<Dependency>where
Self: 'static,
§fn export(cfg: &Config) -> Result<(), ExportError>where
Self: 'static,
fn export(cfg: &Config) -> Result<(), ExportError>where
Self: 'static,
TS::export_all]. Read more§fn export_all(cfg: &Config) -> Result<(), ExportError>where
Self: 'static,
fn export_all(cfg: &Config) -> Result<(), ExportError>where
Self: 'static,
TS::export]. Read moreAuto Trait Implementations§
impl Freeze for RunEvent
impl RefUnwindSafe for RunEvent
impl Send for RunEvent
impl Sync for RunEvent
impl Unpin for RunEvent
impl UnsafeUnpin for RunEvent
impl UnwindSafe for RunEvent
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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