pub struct TaskInputSpec {
pub project_root: Option<String>,
pub work_dir: Option<String>,
pub task_metadata: Option<Value>,
}Expand description
Canonical bag of Task-level fields (project_root / work_dir /
task_metadata) — TaskLaunchInput::task_input’s type.
Issue #19 ST2: replaces the ST1 resolve_task_level_init_ctx
fold-back-into-init_ctx bridge (removed from
mlua-swarm-server’s run_flow_form). Callers resolve these three
fields once at the wire boundary — sibling body field first, falling
back to the legacy shape (same three keys nested directly inside
init_ctx) only there — and hand the result straight through here;
init_ctx itself is no longer mutated to carry them, so it stays a
pure flow-ir eval seed identical to whatever the caller sent.
Each field is independently optional — see
crate::middleware::task_input::TaskInputMiddleware::new_from_fields,
which this is built for.
Issue #19 ST4: also Serialize/Deserialize so it can travel over the
wire as RunKickRequest.task_input_override (mlua-swarm-server’s
tasks module) and be snapshotted into TaskRecord.task_input_spec
(JSON) for rekick to resolve back out of. Every field is
#[serde(default)] so a caller may omit any subset (or send {}) and
still deserialize.
Fields§
§project_root: Option<String>Task-level project root path.
work_dir: Option<String>Task-level working directory path.
task_metadata: Option<Value>Task-level arbitrary metadata bag (a JSON object, or None).
Trait Implementations§
Source§impl Clone for TaskInputSpec
impl Clone for TaskInputSpec
Source§fn clone(&self) -> TaskInputSpec
fn clone(&self) -> TaskInputSpec
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TaskInputSpec
impl Debug for TaskInputSpec
Source§impl Default for TaskInputSpec
impl Default for TaskInputSpec
Source§fn default() -> TaskInputSpec
fn default() -> TaskInputSpec
Source§impl<'de> Deserialize<'de> for TaskInputSpec
impl<'de> Deserialize<'de> for TaskInputSpec
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>,
Source§impl JsonSchema for TaskInputSpec
impl JsonSchema for TaskInputSpec
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl PartialEq for TaskInputSpec
impl PartialEq for TaskInputSpec
Source§fn eq(&self, other: &TaskInputSpec) -> bool
fn eq(&self, other: &TaskInputSpec) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for TaskInputSpec
impl Serialize for TaskInputSpec
impl StructuralPartialEq for TaskInputSpec
Auto Trait Implementations§
impl Freeze for TaskInputSpec
impl RefUnwindSafe for TaskInputSpec
impl Send for TaskInputSpec
impl Sync for TaskInputSpec
impl Unpin for TaskInputSpec
impl UnsafeUnpin for TaskInputSpec
impl UnwindSafe for TaskInputSpec
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