Trait rquickjs_core::function::IntoArg

source ·
pub trait IntoArg<'js> {
    // Required methods
    fn num_args(&self) -> usize;
    fn into_arg(self, args: &mut Args<'js>) -> Result<()>;
}
Expand description

A trait for converting values into arguments.

Required Methods§

source

fn num_args(&self) -> usize

The number of arguments this value produces.

source

fn into_arg(self, args: &mut Args<'js>) -> Result<()>

Convert the value into an argument.

Implementors§

source§

impl<'js, T: IntoJs<'js>> IntoArg<'js> for Opt<T>

source§

impl<'js, T: IntoJs<'js>> IntoArg<'js> for Rest<T>

source§

impl<'js, T: IntoJs<'js>> IntoArg<'js> for This<T>

source§

impl<'js, T: IntoJs<'js>> IntoArg<'js> for T

source§

impl<'js, T: IntoArgs<'js>> IntoArg<'js> for Flat<T>