pub enum FunctionConfig {
Map {
name: MapName,
input: MapConfig,
},
Validation {
name: ValidationName,
input: ValidationConfig,
},
ParseJson {
name: ParseJsonName,
input: ParseConfig,
},
ParseXml {
name: ParseXmlName,
input: ParseConfig,
},
PublishJson {
name: PublishJsonName,
input: PublishConfig,
},
PublishXml {
name: PublishXmlName,
input: PublishConfig,
},
Filter {
name: FilterName,
input: FilterConfig,
},
Log {
name: LogName,
input: LogConfig,
},
HttpCall {
name: HttpCallName,
input: HttpCallConfig,
},
Enrich {
name: EnrichName,
input: EnrichConfig,
},
PublishKafka {
name: PublishKafkaName,
input: PublishKafkaConfig,
},
Custom {
name: String,
input: Value,
compiled_input: Option<CompiledCustomInput>,
},
}Expand description
Enum containing all possible function configurations.
Deserialization dispatches on the name field: each known built-in
(map, validate, parse_json, …) parses its input strictly into the
matching typed config and errors with a clear envelope (config for function 'map': missing field 'mappings'). Unknown names fall through
to FunctionConfig::Custom, which preserves the raw input for a
user-registered handler to consume at engine construction time.
Variants§
Map
Validation
ParseJson
ParseXml
PublishJson
PublishXml
Filter
Log
HttpCall
Enrich
PublishKafka
Custom
For custom or unknown functions, store raw input and a slot for the pre-parsed typed value populated at engine construction time.
Fields
compiled_input: Option<CompiledCustomInput>Pre-parsed <RegisteredHandler as AsyncFunctionHandler>::Input,
boxed as dyn Any. Set by the engine after handler registration;
None on initial deserialization. FunctionConfig is
deserialize-only — round-tripping a workflow through JSON
re-parses on the next Engine::new() call.
Implementations§
Source§impl FunctionConfig
impl FunctionConfig
Sourcepub fn function_name(&self) -> &str
pub fn function_name(&self) -> &str
Get the function name for this configuration
Sourcepub fn is_sync_builtin(&self) -> bool
pub fn is_sync_builtin(&self) -> bool
Whether this is a synchronous built-in. Synchronous built-ins can share
a single ArenaContext lifetime across consecutive tasks within a
workflow without crossing any .await point.
Must match the variants handled in Self::try_execute_in_arena; the
debug assertion below ties the two together so they can’t drift.
Trait Implementations§
Source§impl Clone for FunctionConfig
impl Clone for FunctionConfig
Source§fn clone(&self) -> FunctionConfig
fn clone(&self) -> FunctionConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more