Trait CallArgs

Source
pub trait CallArgs: Sealed {
    // Required method
    fn into_arg_string(self) -> Result<String, AnyError>;
}
Expand description

Trait that is implemented for types that can be passed as argument to Script::call().

This is currently only implemented for tuples of size 0..=5, i.e. JS functions with 0 to 5 arguments. Use structs or arrays inside a one-element tuple if you need more flexibility.

Required Methods§

Source

fn into_arg_string(self) -> Result<String, AnyError>

Convert the arguments into a JSON string

Implementations on Foreign Types§

Source§

impl CallArgs for ()

Source§

impl<P0> CallArgs for (P0,)
where P0: Serialize,

Source§

impl<P0, P1> CallArgs for (P0, P1)
where P0: Serialize, P1: Serialize,

Source§

impl<P0, P1, P2> CallArgs for (P0, P1, P2)
where P0: Serialize, P1: Serialize, P2: Serialize,

Source§

impl<P0, P1, P2, P3> CallArgs for (P0, P1, P2, P3)
where P0: Serialize, P1: Serialize, P2: Serialize, P3: Serialize,

Source§

impl<P0, P1, P2, P3, P4> CallArgs for (P0, P1, P2, P3, P4)
where P0: Serialize, P1: Serialize, P2: Serialize, P3: Serialize, P4: Serialize,

Implementors§