pub struct ArgMapping {
pub name: String,
pub field: String,
pub arg_type: String,
pub optional: bool,
pub owned: bool,
pub element_type: Option<String>,
pub go_type: Option<String>,
}Expand description
Maps a fixture input field to a function argument.
Fields§
§name: StringArgument name in the function signature.
field: StringJSON field path in the fixture’s input object.
arg_type: StringType hint for code generation.
optional: boolWhether this argument is optional.
owned: boolWhen true, the Rust codegen passes this argument by value (owned) rather than
by reference. Use for Vec<T> parameters that do not accept &Vec<T>.
element_type: Option<String>For json_object args targeting &[T] Rust parameters, set to the element type
(e.g. "f32", "String") so the codegen emits Vec<element_type> annotation.
go_type: Option<String>Override the Go slice element type for json_object array args.
When set, the Go e2e codegen uses this as the element type instead of the default
derived from element_type. Use Go-idiomatic type names including the import alias
prefix where needed, e.g. "kreuzberg.BatchBytesItem" or "string".
Trait Implementations§
Source§impl Clone for ArgMapping
impl Clone for ArgMapping
Source§fn clone(&self) -> ArgMapping
fn clone(&self) -> ArgMapping
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more