pub struct CallConfig {Show 16 fields
pub function: String,
pub module: String,
pub result_var: String,
pub async: bool,
pub path: Option<String>,
pub method: Option<String>,
pub args: Vec<ArgMapping>,
pub overrides: HashMap<String, CallOverride>,
pub returns_result: bool,
pub returns_void: bool,
pub skip_languages: Vec<String>,
pub result_is_simple: bool,
pub result_is_vec: bool,
pub result_is_array: bool,
pub result_is_bytes: bool,
pub result_is_option: bool,
}Expand description
Configuration for the function call in each test.
Fields§
§function: StringThe function name (alef applies language naming conventions).
module: StringThe module/package where the function lives.
result_var: StringVariable name for the return value (default: “result”).
async: boolWhether the function is async.
path: Option<String>HTTP endpoint path for mock server routing (e.g., "/v1/chat/completions").
Required when fixtures use mock_response. The Rust e2e generator uses
this to build the MockRoute that the mock server matches against.
method: Option<String>HTTP method for mock server routing (default: "POST").
Used together with path when building MockRoute entries.
args: Vec<ArgMapping>How fixture input fields map to function arguments.
overrides: HashMap<String, CallOverride>Per-language overrides for module/function/etc.
returns_result: boolWhether the function returns Result<T, E> in its native binding.
Defaults to true. When false, generators that distinguish Result-returning
from non-Result-returning calls (currently Rust) will skip the
.expect("should succeed") unwrap and bind the raw return value directly.
returns_void: boolWhether the function returns only an error/unit — i.e., Result<(), E>.
When combined with returns_result = true, Go generators emit err := func()
(single return value) rather than _, err := func() (two return values).
This is needed for functions like validate_host that return only error in Go.
skip_languages: Vec<String>skip_languages
result_is_simple: boolWhen true, the function returns a primitive (e.g. String, bool,
i32) rather than a struct. Generators that would otherwise emit
result.<field> will fall back to the bare result variable.
This is a property of the Rust core’s return type and therefore identical
across every binding — set it on the call, not in per-language overrides.
The same flag is also accepted under [e2e.calls.<name>.overrides.<lang>]
for backwards compatibility, but the call-level value takes precedence.
result_is_vec: boolWhen true, the function returns Vec<T> / Array<T>. Generators that
support per-element field assertions (rust, csharp) iterate or index into
the result; the typescript codegen indexes [0] to mirror csharp.
As with result_is_simple, this is a Rust-side property — set it on the
call, not on per-language overrides. Per-language overrides remain
supported for backwards compatibility.
result_is_array: boolWhen true (combined with result_is_simple), the simple return is a
slice/array (e.g., Vec<String> → string[] in TS).
result_is_bytes: boolWhen true, the function returns a raw byte array (Vec<u8> →
Uint8Array / []byte / byte[]).
result_is_option: boolWhen true, the function returns Option<T>.
Trait Implementations§
Source§impl Clone for CallConfig
impl Clone for CallConfig
Source§fn clone(&self) -> CallConfig
fn clone(&self) -> CallConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more