pub enum InterventionOutcome {
Applied,
CapabilityNotSupported {
primitive: InterventionPrimitive,
},
StaleTarget {
detail: String,
},
}Expand description
The neutral outcome of routing one InterventionCommand to the worker owning the target
attempt — the ack that surfaces back to the operator.
The three variants ARE the three distinct outcome classes the design locks (§6.4), expressed harness-neutrally so the wire, the server, and the ops console never inspect a harness error:
Self::Applied— the session accepted and applied the command.Self::CapabilityNotSupported— the target harness does not advertise the command’s primitive. The server gates on the advertised set BEFORE routing, so this is normally returned by the server without a wire round-trip; a worker returns it too if a gated command still reaches it.Self::StaleTarget— the target(workflow, activity, attempt)is finished, superseded by a later attempt, or unknown (the attempt-scoped no-op). It is an honest NACK, never a crash.
Carried as its own enum (not a Result) so it round-trips over ts-rs into the ops console
exactly like the other real-time DTOs, and so a future outcome class is an additive variant.
Variants§
Applied
The command was delivered to the live session and applied.
CapabilityNotSupported
The command’s primitive is not in the target harness’s advertised capability set.
Fields
primitive: InterventionPrimitiveThe primitive the target does not support.
StaleTarget
The target attempt is finished, superseded, or unknown — an attempt-scoped no-op.
Implementations§
Source§impl InterventionOutcome
impl InterventionOutcome
Sourcepub const fn is_applied(&self) -> bool
pub const fn is_applied(&self) -> bool
Returns true when the command was applied to a live session.
Sourcepub const fn capability_not_supported(primitive: InterventionPrimitive) -> Self
pub const fn capability_not_supported(primitive: InterventionPrimitive) -> Self
Builds a Self::CapabilityNotSupported naming the ungated primitive.
Sourcepub fn stale_target(detail: impl Into<String>) -> Self
pub fn stale_target(detail: impl Into<String>) -> Self
Builds a Self::StaleTarget with a detail message.
Trait Implementations§
Source§impl Clone for InterventionOutcome
impl Clone for InterventionOutcome
Source§fn clone(&self) -> InterventionOutcome
fn clone(&self) -> InterventionOutcome
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 InterventionOutcome
impl Debug for InterventionOutcome
Source§impl<'de> Deserialize<'de> for InterventionOutcome
impl<'de> Deserialize<'de> for InterventionOutcome
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>,
impl Eq for InterventionOutcome
Source§impl PartialEq for InterventionOutcome
impl PartialEq for InterventionOutcome
Source§impl Serialize for InterventionOutcome
impl Serialize for InterventionOutcome
impl StructuralPartialEq for InterventionOutcome
Source§impl TS for InterventionOutcome
impl TS for InterventionOutcome
Source§type WithoutGenerics = InterventionOutcome
type WithoutGenerics = InterventionOutcome
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 = InterventionOutcome
type OptionInnerType = InterventionOutcome
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
Self: 'static,
fn visit_generics(v: &mut impl TypeVisitor)where
Self: '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
Self: 'static,
fn visit_dependencies(v: &mut impl TypeVisitor)where
Self: 'static,
Source§fn dependencies(cfg: &Config) -> Vec<Dependency>where
Self: 'static,
fn dependencies(cfg: &Config) -> Vec<Dependency>where
Self: 'static,
Source§fn export(cfg: &Config) -> Result<(), ExportError>where
Self: 'static,
fn export(cfg: &Config) -> Result<(), ExportError>where
Self: 'static,
TS::export_all. Read moreSource§fn export_all(cfg: &Config) -> Result<(), ExportError>where
Self: 'static,
fn export_all(cfg: &Config) -> Result<(), ExportError>where
Self: 'static,
TS::export. Read more