[−][src]Trait glsp_engine::ToCallArgs
A type which can be converted into the arguments to a function call.
It's not possible to implement this trait for your own types, but it's implemented for tuples
and vectors of various sizes, when their elements all implement ToVal.
Functions like glsp:call and Obj::call are
generic over this trait. They usually define their arguments as &T where T: ToCallArgs,
so tuples of arguments will need to be passed by reference:
let push_rfn: RFn = glsp::global("push!"); glsp::call(&push_rfn, &(my_arr, 100i32))?;
Required methods
Loading content...Implementations on Foreign Types
impl<T: ToVal> ToCallArgs for [T][src]
fn arg_count(&self) -> usize[src]
fn to_call_args<E: Extend<Slot>>(&self, dst: &mut E) -> GResult<()>[src]
impl<T> ToCallArgs for [T; 0][src]
fn arg_count(&self) -> usize[src]
fn to_call_args<E: Extend<Slot>>(&self, _dst: &mut E) -> GResult<()>[src]
impl<T: ToVal> ToCallArgs for [T; 1][src]
fn arg_count(&self) -> usize[src]
fn to_call_args<E: Extend<Slot>>(&self, dst: &mut E) -> GResult<()>[src]
impl<T: ToVal> ToCallArgs for [T; 2][src]
fn arg_count(&self) -> usize[src]
fn to_call_args<E: Extend<Slot>>(&self, dst: &mut E) -> GResult<()>[src]
impl<T: ToVal> ToCallArgs for [T; 3][src]
fn arg_count(&self) -> usize[src]
fn to_call_args<E: Extend<Slot>>(&self, dst: &mut E) -> GResult<()>[src]
impl<T: ToVal> ToCallArgs for [T; 4][src]
fn arg_count(&self) -> usize[src]
fn to_call_args<E: Extend<Slot>>(&self, dst: &mut E) -> GResult<()>[src]
impl<T: ToVal> ToCallArgs for [T; 5][src]
fn arg_count(&self) -> usize[src]
fn to_call_args<E: Extend<Slot>>(&self, dst: &mut E) -> GResult<()>[src]
impl<T: ToVal> ToCallArgs for [T; 6][src]
fn arg_count(&self) -> usize[src]
fn to_call_args<E: Extend<Slot>>(&self, dst: &mut E) -> GResult<()>[src]
impl<T: ToVal> ToCallArgs for [T; 7][src]
fn arg_count(&self) -> usize[src]
fn to_call_args<E: Extend<Slot>>(&self, dst: &mut E) -> GResult<()>[src]
impl<T: ToVal> ToCallArgs for [T; 8][src]
fn arg_count(&self) -> usize[src]
fn to_call_args<E: Extend<Slot>>(&self, dst: &mut E) -> GResult<()>[src]
impl<T: ToVal> ToCallArgs for [T; 9][src]
fn arg_count(&self) -> usize[src]
fn to_call_args<E: Extend<Slot>>(&self, dst: &mut E) -> GResult<()>[src]
impl<T: ToVal> ToCallArgs for [T; 10][src]
fn arg_count(&self) -> usize[src]
fn to_call_args<E: Extend<Slot>>(&self, dst: &mut E) -> GResult<()>[src]
impl<T: ToVal> ToCallArgs for [T; 11][src]
fn arg_count(&self) -> usize[src]
fn to_call_args<E: Extend<Slot>>(&self, dst: &mut E) -> GResult<()>[src]
impl<T: ToVal> ToCallArgs for [T; 12][src]
fn arg_count(&self) -> usize[src]
fn to_call_args<E: Extend<Slot>>(&self, dst: &mut E) -> GResult<()>[src]
impl ToCallArgs for ()[src]
fn arg_count(&self) -> usize[src]
fn to_call_args<E: Extend<Slot>>(&self, _dst: &mut E) -> GResult<()>[src]
impl<A> ToCallArgs for (A,) where
A: ToVal, [src]
A: ToVal,
fn arg_count(&self) -> usize[src]
fn to_call_args<EE: Extend<Slot>>(&self, dst: &mut EE) -> GResult<()>[src]
impl<A, B> ToCallArgs for (A, B) where
A: ToVal,
B: ToVal, [src]
A: ToVal,
B: ToVal,
fn arg_count(&self) -> usize[src]
fn to_call_args<EE: Extend<Slot>>(&self, dst: &mut EE) -> GResult<()>[src]
impl<A, B, C> ToCallArgs for (A, B, C) where
A: ToVal,
B: ToVal,
C: ToVal, [src]
A: ToVal,
B: ToVal,
C: ToVal,
fn arg_count(&self) -> usize[src]
fn to_call_args<EE: Extend<Slot>>(&self, dst: &mut EE) -> GResult<()>[src]
impl<A, B, C, D> ToCallArgs for (A, B, C, D) where
A: ToVal,
B: ToVal,
C: ToVal,
D: ToVal, [src]
A: ToVal,
B: ToVal,
C: ToVal,
D: ToVal,
fn arg_count(&self) -> usize[src]
fn to_call_args<EE: Extend<Slot>>(&self, dst: &mut EE) -> GResult<()>[src]
impl<A, B, C, D, E> ToCallArgs for (A, B, C, D, E) where
A: ToVal,
B: ToVal,
C: ToVal,
D: ToVal,
E: ToVal, [src]
A: ToVal,
B: ToVal,
C: ToVal,
D: ToVal,
E: ToVal,
fn arg_count(&self) -> usize[src]
fn to_call_args<EE: Extend<Slot>>(&self, dst: &mut EE) -> GResult<()>[src]
impl<A, B, C, D, E, F> ToCallArgs for (A, B, C, D, E, F) where
A: ToVal,
B: ToVal,
C: ToVal,
D: ToVal,
E: ToVal,
F: ToVal, [src]
A: ToVal,
B: ToVal,
C: ToVal,
D: ToVal,
E: ToVal,
F: ToVal,
fn arg_count(&self) -> usize[src]
fn to_call_args<EE: Extend<Slot>>(&self, dst: &mut EE) -> GResult<()>[src]
impl<A, B, C, D, E, F, G> ToCallArgs for (A, B, C, D, E, F, G) where
A: ToVal,
B: ToVal,
C: ToVal,
D: ToVal,
E: ToVal,
F: ToVal,
G: ToVal, [src]
A: ToVal,
B: ToVal,
C: ToVal,
D: ToVal,
E: ToVal,
F: ToVal,
G: ToVal,
fn arg_count(&self) -> usize[src]
fn to_call_args<EE: Extend<Slot>>(&self, dst: &mut EE) -> GResult<()>[src]
impl<A, B, C, D, E, F, G, H> ToCallArgs for (A, B, C, D, E, F, G, H) where
A: ToVal,
B: ToVal,
C: ToVal,
D: ToVal,
E: ToVal,
F: ToVal,
G: ToVal,
H: ToVal, [src]
A: ToVal,
B: ToVal,
C: ToVal,
D: ToVal,
E: ToVal,
F: ToVal,
G: ToVal,
H: ToVal,
fn arg_count(&self) -> usize[src]
fn to_call_args<EE: Extend<Slot>>(&self, dst: &mut EE) -> GResult<()>[src]
impl<A, B, C, D, E, F, G, H, I> ToCallArgs for (A, B, C, D, E, F, G, H, I) where
A: ToVal,
B: ToVal,
C: ToVal,
D: ToVal,
E: ToVal,
F: ToVal,
G: ToVal,
H: ToVal,
I: ToVal, [src]
A: ToVal,
B: ToVal,
C: ToVal,
D: ToVal,
E: ToVal,
F: ToVal,
G: ToVal,
H: ToVal,
I: ToVal,
fn arg_count(&self) -> usize[src]
fn to_call_args<EE: Extend<Slot>>(&self, dst: &mut EE) -> GResult<()>[src]
impl<A, B, C, D, E, F, G, H, I, J> ToCallArgs for (A, B, C, D, E, F, G, H, I, J) where
A: ToVal,
B: ToVal,
C: ToVal,
D: ToVal,
E: ToVal,
F: ToVal,
G: ToVal,
H: ToVal,
I: ToVal,
J: ToVal, [src]
A: ToVal,
B: ToVal,
C: ToVal,
D: ToVal,
E: ToVal,
F: ToVal,
G: ToVal,
H: ToVal,
I: ToVal,
J: ToVal,
fn arg_count(&self) -> usize[src]
fn to_call_args<EE: Extend<Slot>>(&self, dst: &mut EE) -> GResult<()>[src]
impl<A, B, C, D, E, F, G, H, I, J, K> ToCallArgs for (A, B, C, D, E, F, G, H, I, J, K) where
A: ToVal,
B: ToVal,
C: ToVal,
D: ToVal,
E: ToVal,
F: ToVal,
G: ToVal,
H: ToVal,
I: ToVal,
J: ToVal,
K: ToVal, [src]
A: ToVal,
B: ToVal,
C: ToVal,
D: ToVal,
E: ToVal,
F: ToVal,
G: ToVal,
H: ToVal,
I: ToVal,
J: ToVal,
K: ToVal,
fn arg_count(&self) -> usize[src]
fn to_call_args<EE: Extend<Slot>>(&self, dst: &mut EE) -> GResult<()>[src]
impl<A, B, C, D, E, F, G, H, I, J, K, L> ToCallArgs for (A, B, C, D, E, F, G, H, I, J, K, L) where
A: ToVal,
B: ToVal,
C: ToVal,
D: ToVal,
E: ToVal,
F: ToVal,
G: ToVal,
H: ToVal,
I: ToVal,
J: ToVal,
K: ToVal,
L: ToVal, [src]
A: ToVal,
B: ToVal,
C: ToVal,
D: ToVal,
E: ToVal,
F: ToVal,
G: ToVal,
H: ToVal,
I: ToVal,
J: ToVal,
K: ToVal,
L: ToVal,