Skip to main content

IssueCode

Enum IssueCode 

Source
#[non_exhaustive]
pub enum IssueCode {
Show 24 variants EmptyWorkflowId, EmptyWorkflowName, NoTasks, MissingStepId, DuplicateStepId, EmptyGroup, GroupTooDeep, MissingFunction, InvalidFunctionName, InvalidTerminal, LoopIncrementTooSmall, LoopBoundEmpty, LoopCounterInvalid, UnknownFunction, MissingHandler, InputParse, TemplateCompile, UnknownSecret, SecretInMessageWrite, InvalidSecretStore, DuplicateTemplateKey, EscapedTemplateKey, ParseFailed, ValidateFailed,
}
Expand description

Why a workflow definition is not loadable.

#[non_exhaustive]: a later minor may add a rule, and a host matching on the codes it cares about should keep compiling. Use Self::as_str to serialize.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

EmptyWorkflowId

id is missing or empty.

§

EmptyWorkflowName

name is missing or empty.

§

NoTasks

tasks is missing, not an array, or empty.

§

MissingStepId

A step carries no id.

§

DuplicateStepId

Two steps share an id. Groups share the task id namespace.

§

EmptyGroup

A group’s tasks is not a non-empty array.

§

GroupTooDeep

A group is nested at or beyond MAX_GROUP_DEPTH.

§

MissingFunction

A task carries no function.

§

InvalidFunctionName

function is not an object, or its name is missing or empty.

§

InvalidTerminal

terminal is present but not a boolean.

§

LoopIncrementTooSmall

loop.increment is below 1 — the counter would never reach max.

§

LoopBoundEmpty

loop.max is not greater than loop.init — no sweep could ever run.

§

LoopCounterInvalid

loop.counter is not a non-empty dotted path.

§

UnknownFunction

No handler will dispatch this function name, and it is not a built-in. Usually a typo or a handler the host forgot to register.

§

MissingHandler

The name is a built-in, but one that ships as a config schema only (http_call, enrich, publish_kafka) and no handler is registered under it. The workflow builds cleanly and then fails every message.

§

InputParse

A custom task’s input does not deserialize into its handler’s declared Input type.

§

TemplateCompile

A Template field of a custom task’s input does not compile.

§

UnknownSecret

An expression reads {"secret": "name"} and no secret of that name is declared on the engine (EngineBuilder::with_secrets). Only literal names are checked; a dynamic name fails at evaluation instead.

§

SecretInMessageWrite

An expression whose result the engine writes to the message or emits to a log reads a secret — a map mapping, or a log message or field. The store exists so a value is never recorded; an expression that would record it is refused outright, derived or not. Compute derived values in a custom handler.

§

InvalidSecretStore

The store passed to EngineBuilder::with_secrets is not a JSON object, so no name resolves and EngineBuilder::build will fail. Reported by EngineBuilder::check_workflow instead of the Self::UnknownSecret issues every literal name would otherwise produce — the workflow is not what is wrong.

§

DuplicateTemplateKey

Two keys in one template object collapse to the same name once the template-key escape is stripped — {"$a": 1, "a": 2} emits a twice. The context is a Vec of pairs, so both survive: a later read sees only the first while serialization emits both. Always a bug, so crate::EngineBuilder::build refuses it.

§

EscapedTemplateKey

A template key carries the escape prefix, so it is emitted with one prefix stripped: $type emits type. Informational — reported by crate::Engine::check_workflow and never by crate::EngineBuilder::build.

Exists for migration. The escape strips uniformly from every template key, so a workflow written before 3.9 that emits genuinely $-prefixed keys — MongoDB’s $set/$oid, JSON Schema’s $schema/$ref — changes what it produces, silently. This lists every one so the audit is mechanical rather than archaeological.

§

ParseFailed

The document does not deserialize into a Workflow. Carries the parser’s own message, which names the offending field and type.

§

ValidateFailed

The document parses but Workflow::validate rejects it. A backstop: reaching this means a rule exists that the checks above do not model.

Implementations§

Source§

impl IssueCode

Source

pub fn as_str(&self) -> &'static str

The stable string form, for serializing into an API response.

Trait Implementations§

Source§

impl Clone for IssueCode

Source§

fn clone(&self) -> IssueCode

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for IssueCode

Source§

impl Debug for IssueCode

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for IssueCode

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for IssueCode

Source§

impl Hash for IssueCode

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for IssueCode

Source§

fn eq(&self, other: &IssueCode) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for IssueCode

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.