pub struct ArgMapping {
pub name: String,
pub field: String,
pub arg_type: String,
pub optional: bool,
pub owned: bool,
pub element_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.
Trait Implementations§
Source§impl Clone for ArgMapping
impl Clone for ArgMapping
Source§fn clone(&self) -> ArgMapping
fn clone(&self) -> ArgMapping
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ArgMapping
impl Debug for ArgMapping
Source§impl<'de> Deserialize<'de> for ArgMapping
impl<'de> Deserialize<'de> for ArgMapping
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ArgMapping, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ArgMapping, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for ArgMapping
impl Serialize for ArgMapping
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for ArgMapping
impl RefUnwindSafe for ArgMapping
impl Send for ArgMapping
impl Sync for ArgMapping
impl Unpin for ArgMapping
impl UnsafeUnpin for ArgMapping
impl UnwindSafe for ArgMapping
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
Mutably borrows from an owned value. Read more