pub struct CallConfig {
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>,
}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
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