Skip to main content

JsArgs

Trait JsArgs 

Source
pub trait JsArgs<T: JsFunction> {
    type BindOutput;

    // Required methods
    fn apply_call(
        self,
        func: &Function<T>,
        context: &JsValue,
    ) -> Result<T::Ret, JsValue>;
    fn apply_bind(
        self,
        func: &Function<T>,
        context: &JsValue,
    ) -> Self::BindOutput;
}
Expand description

Trait for argument tuples that can call or bind a Function<T>.

Required Associated Types§

Required Methods§

Source

fn apply_call( self, func: &Function<T>, context: &JsValue, ) -> Result<T::Ret, JsValue>

Source

fn apply_bind(self, func: &Function<T>, context: &JsValue) -> Self::BindOutput

Implementations on Foreign Types§

Source§

impl<Ret: JsGeneric, Arg1: JsGeneric, Arg2: JsGeneric, Arg3: JsGeneric, Arg4: JsGeneric, Arg5: JsGeneric, Arg6: JsGeneric, Arg7: JsGeneric, Arg8: JsGeneric, F: JsFunction8<Ret = Ret, Arg1 = Arg1, Arg2 = Arg2, Arg3 = Arg3, Arg4 = Arg4, Arg5 = Arg5, Arg6 = Arg6, Arg7 = Arg7, Arg8 = Arg8>> JsArgs<F> for (&Arg1, &Arg2, &Arg3, &Arg4, &Arg5, &Arg6, &Arg7, &Arg8)

Source§

type BindOutput = Function<<F as JsFunction8>::Bind8>

Source§

fn apply_call( self, func: &Function<F>, context: &JsValue, ) -> Result<Ret, JsValue>

Source§

fn apply_bind(self, func: &Function<F>, context: &JsValue) -> Self::BindOutput

Source§

impl<Ret: JsGeneric, Arg1: JsGeneric, Arg2: JsGeneric, Arg3: JsGeneric, Arg4: JsGeneric, Arg5: JsGeneric, Arg6: JsGeneric, Arg7: JsGeneric, F: JsFunction7<Ret = Ret, Arg1 = Arg1, Arg2 = Arg2, Arg3 = Arg3, Arg4 = Arg4, Arg5 = Arg5, Arg6 = Arg6, Arg7 = Arg7>> JsArgs<F> for (&Arg1, &Arg2, &Arg3, &Arg4, &Arg5, &Arg6, &Arg7)

Source§

type BindOutput = Function<<F as JsFunction7>::Bind7>

Source§

fn apply_call( self, func: &Function<F>, context: &JsValue, ) -> Result<Ret, JsValue>

Source§

fn apply_bind(self, func: &Function<F>, context: &JsValue) -> Self::BindOutput

Source§

impl<Ret: JsGeneric, Arg1: JsGeneric, Arg2: JsGeneric, Arg3: JsGeneric, Arg4: JsGeneric, Arg5: JsGeneric, Arg6: JsGeneric, F: JsFunction6<Ret = Ret, Arg1 = Arg1, Arg2 = Arg2, Arg3 = Arg3, Arg4 = Arg4, Arg5 = Arg5, Arg6 = Arg6>> JsArgs<F> for (&Arg1, &Arg2, &Arg3, &Arg4, &Arg5, &Arg6)

Source§

type BindOutput = Function<<F as JsFunction6>::Bind6>

Source§

fn apply_call( self, func: &Function<F>, context: &JsValue, ) -> Result<Ret, JsValue>

Source§

fn apply_bind(self, func: &Function<F>, context: &JsValue) -> Self::BindOutput

Source§

impl<Ret: JsGeneric, Arg1: JsGeneric, Arg2: JsGeneric, Arg3: JsGeneric, Arg4: JsGeneric, Arg5: JsGeneric, F: JsFunction5<Ret = Ret, Arg1 = Arg1, Arg2 = Arg2, Arg3 = Arg3, Arg4 = Arg4, Arg5 = Arg5>> JsArgs<F> for (&Arg1, &Arg2, &Arg3, &Arg4, &Arg5)

Source§

type BindOutput = Function<<F as JsFunction5>::Bind5>

Source§

fn apply_call( self, func: &Function<F>, context: &JsValue, ) -> Result<Ret, JsValue>

Source§

fn apply_bind(self, func: &Function<F>, context: &JsValue) -> Self::BindOutput

Source§

impl<Ret: JsGeneric, Arg1: JsGeneric, Arg2: JsGeneric, Arg3: JsGeneric, Arg4: JsGeneric, F: JsFunction4<Ret = Ret, Arg1 = Arg1, Arg2 = Arg2, Arg3 = Arg3, Arg4 = Arg4>> JsArgs<F> for (&Arg1, &Arg2, &Arg3, &Arg4)

Source§

type BindOutput = Function<<F as JsFunction4>::Bind4>

Source§

fn apply_call( self, func: &Function<F>, context: &JsValue, ) -> Result<Ret, JsValue>

Source§

fn apply_bind(self, func: &Function<F>, context: &JsValue) -> Self::BindOutput

Source§

impl<Ret: JsGeneric, Arg1: JsGeneric, Arg2: JsGeneric, Arg3: JsGeneric, F: JsFunction3<Ret = Ret, Arg1 = Arg1, Arg2 = Arg2, Arg3 = Arg3>> JsArgs<F> for (&Arg1, &Arg2, &Arg3)

Source§

type BindOutput = Function<<F as JsFunction3>::Bind3>

Source§

fn apply_call( self, func: &Function<F>, context: &JsValue, ) -> Result<Ret, JsValue>

Source§

fn apply_bind(self, func: &Function<F>, context: &JsValue) -> Self::BindOutput

Source§

impl<Ret: JsGeneric, Arg1: JsGeneric, Arg2: JsGeneric, F: JsFunction2<Ret = Ret, Arg1 = Arg1, Arg2 = Arg2>> JsArgs<F> for (&Arg1, &Arg2)

Source§

type BindOutput = Function<<F as JsFunction2>::Bind2>

Source§

fn apply_call( self, func: &Function<F>, context: &JsValue, ) -> Result<Ret, JsValue>

Source§

fn apply_bind(self, func: &Function<F>, context: &JsValue) -> Self::BindOutput

Source§

impl<Ret: JsGeneric, Arg1: JsGeneric, F: JsFunction1<Ret = Ret, Arg1 = Arg1>> JsArgs<F> for (&Arg1,)

Source§

type BindOutput = Function<<F as JsFunction1>::Bind1>

Source§

fn apply_call( self, func: &Function<F>, context: &JsValue, ) -> Result<Ret, JsValue>

Source§

fn apply_bind(self, func: &Function<F>, context: &JsValue) -> Self::BindOutput

Source§

impl<Ret: JsGeneric, F: JsFunction<Ret = Ret>> JsArgs<F> for ()

Source§

type BindOutput = Function<F>

Source§

fn apply_call( self, func: &Function<F>, context: &JsValue, ) -> Result<Ret, JsValue>

Source§

fn apply_bind(self, func: &Function<F>, context: &JsValue) -> Self::BindOutput

Implementors§