pub enum StructureError {
MissingEntrySource {
module: String,
},
EntrySourceNotUtf8 {
module: String,
},
NoWorkflowImport {
module: String,
},
UnknownActivity {
activity: String,
},
EntryFunctionNotFound {
module: String,
function: String,
},
UnboundedDelta {
reason: String,
},
DeltaTargetMissing {
id: usize,
},
RegenInvalidName {
name: String,
reason: String,
},
}Expand description
Errors produced while extracting a workflow graph model from a package or regenerating Gleam from a bounded structural delta.
Variants§
MissingEntrySource
The manifest names an entry module whose Gleam source is absent from the
package src/ set, so the primitive structure cannot be derived.
A package may legitimately ship without source (beam-only deploys), but structure extraction requires the verbatim entry-module source to read.
EntrySourceNotUtf8
The entry-module source bytes are not valid UTF-8 and cannot be scanned for the workflow vocabulary.
NoWorkflowImport
The entry-module source never imports aion/workflow, so it invokes
none of the recorded primitives and has no extractable structure.
This is reported rather than returning an empty graph, so a workflow the extractor cannot understand fails loudly instead of rendering as blank.
UnknownActivity
A run node names an activity the package manifest does not declare, so
the extracted graph would not correspond to the workflow’s real
activities.
EntryFunctionNotFound
The manifest names an entry function whose definition is absent from the entry-module source, so the control-flow walk has no root to start from.
Reported rather than returning an empty graph: a workflow whose entry function the extractor cannot locate fails loudly instead of rendering as blank.
Fields
UnboundedDelta
A structural delta fell outside the bounded round-trip vocabulary, so it is refused rather than synthesising unbounded code (CN6, ADR-014).
DeltaTargetMissing
A delta targeted a node id that is not present in the graph.
RegenInvalidName
A regenerated identifier (an activity or module name) would not be a
valid Gleam snake_case identifier, so emitting it would produce code
that does not type-check.
Trait Implementations§
Source§impl Debug for StructureError
impl Debug for StructureError
Source§impl Display for StructureError
impl Display for StructureError
impl Eq for StructureError
Source§impl Error for StructureError
impl Error for StructureError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl PartialEq for StructureError
impl PartialEq for StructureError
impl StructuralPartialEq for StructureError
Auto Trait Implementations§
impl Freeze for StructureError
impl RefUnwindSafe for StructureError
impl Send for StructureError
impl Sync for StructureError
impl Unpin for StructureError
impl UnsafeUnpin for StructureError
impl UnwindSafe for StructureError
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.