pub struct RunContext {
pub run_id: RunId,
pub run_store: Arc<dyn RunStore>,
}Expand description
Pairs a RunId with the RunStore used to persist its trace.
Threaded from the server entry points (POST /v1/tasks, POST /v1/tasks/:id/runs) down through TaskApplication::handle_with_run /
TaskLaunchService::launch / EngineDispatcher (issue #13 run_id
propagation) so every step the dispatcher runs can be appended to
RunRecord.step_entries and the run’s id exposed to workers via
Ctx.meta.runtime["run_id"]. Kept as a distinct type — rather than a
new field on TaskApplicationInput — so the pre-existing exhaustive
struct literal in mlua-swarm-cli’s MCP adapter (TaskApplicationInput { .. }, no run_ctx) keeps compiling unchanged: callers that don’t
care about run tracing keep calling TaskApplication::handle /
TaskLaunchService::launch, which pass None through internally.
Fields§
§run_id: RunIdThe Run this dispatch’s steps should be traced into.
run_store: Arc<dyn RunStore>Where to append StepEntry rows as steps are dispatched.
Trait Implementations§
Source§impl Clone for RunContext
impl Clone for RunContext
Source§fn clone(&self) -> RunContext
fn clone(&self) -> RunContext
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for RunContext
impl !UnwindSafe for RunContext
impl Freeze for RunContext
impl Send for RunContext
impl Sync for RunContext
impl Unpin for RunContext
impl UnsafeUnpin for RunContext
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,
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